Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-1712

cannot delete group which has requireInGroup type

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.3.1, 2.4.0, 2.3.0.patch
    • None
    • None

    Description

      1) testRequireGroup(edu.internet2.middleware.grouper.TestGroupTypeIncludeExclude)edu.internet2.middleware.grouper.exception.GroupDeleteException: Problem in HibernateSession: HibernateSession (2cc1a0e5): notNew, notReadonly, READ_WRITE_NEW, activeTransaction, session (7d37cc67), stem name: aStem:aGroup, group extension: aGroup, group dExtension: aGroup, uuid: 51a737497a8e4209be5569741e7ba62f, ,
      Problem in HibernateSession: HibernateSession (15de8130): new, notReadonly, READ_WRITE_NEW, notActiveTransaction, session (7d37cc67)
      at edu.internet2.middleware.grouper.Group$6.callback(Group.java:1854)
      at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:701)
      at edu.internet2.middleware.grouper.Group.delete(Group.java:1761)
      at edu.internet2.middleware.grouper.TestGroupTypeIncludeExclude.testRequireGroup(TestGroupTypeIncludeExclude.java:1414)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at edu.internet2.middleware.grouper.TestGroupTypeIncludeExclude.main(TestGroupTypeIncludeExclude.java:67)
      Caused by: edu.internet2.middleware.grouper.internal.dao.GrouperDAOException: Problem in HibernateSession: HibernateSession (2cc1a0e5): notNew, notReadonly, READ_WRITE_NEW, activeTransaction, session (7d37cc67)
      at edu.internet2.middleware.grouper.hibernate.HibernateSession._internal_hibernateSessionCatch(HibernateSession.java:589)
      at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:711)
      at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3GroupDAO.delete(Hib3GroupDAO.java:174)
      at edu.internet2.middleware.grouper.Group$6.callback(Group.java:1828)
      ... 17 more
      Caused by: org.hibernate.exception.ConstraintViolationException: could not execute batch
      at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)
      at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
      at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109)
      at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:119)
      at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:97)
      at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:147)
      at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:214)
      at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:589)
      at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
      at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
      at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
      at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1224)
      at edu.internet2.middleware.grouper.hibernate.HibernateSession._internal_hibernateSessionEnd(HibernateSession.java:509)
      at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:708)
      ... 19 more
      Caused by: java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (`grouper_v2_3`.`grouper_composites`, CONSTRAINT `fk_composites_owner` FOREIGN KEY (`owner`) REFERENCES `grouper_groups` (`id`))
      at com.mysql.jdbc.SQLError.createBatchUpdateException(SQLError.java:1158)
      at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1773)
      at com.mysql.jdbc.PreparedStatement.executeBatchInternal(PreparedStatement.java:1257)
      at com.mysql.jdbc.StatementImpl.executeBatch(StatementImpl.java:959)
      at com.p6spy.engine.logging.P6LogPreparedStatement.executeBatch(P6LogPreparedStatement.java:332)
      at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:2544)
      at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:110)
      ... 29 more
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`grouper_v2_3`.`grouper_composites`, CONSTRAINT `fk_composites_owner` FOREIGN KEY (`owner`) REFERENCES `grouper_groups` (`id`))
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
      at com.mysql.jdbc.Util.getInstance(Util.java:387)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:932)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551)
      at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
      at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)
      at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1751)
      ... 34 more

      FAILURES!!!
      Tests run: 1, Failures: 0, Errors: 1

      Attachments

        Activity

          People

            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Smart Checklist