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

member change subject needs to deal with attribute assignments

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4.0
    • Component/s: API
    • Labels:
      None

      Description

      1) testChangeSubjectDidExist(edu.internet2.middleware.grouper.member.TestMemberChangeSubject)edu.internet2.middleware.grouper.internal.dao.GrouperDAOException: Problem in HibernateSession: HibernateSession (2146c8af): notNew, notReadonly, READ_WRITE_NEW, activeTransaction, session (4a9d61fa),
      Exception in saveOrUpdate: edu.internet2.middleware.grouper.audit.AuditEntry, ByObjectStatic, query: ', cacheable: null, cacheRegion: null, entityName: null, tx type: null,
      , this subject: null, new subject: Subject id: test.subject.1, sourceId: jdbc, deleteOldMember: true, report? false,
      Problem in HibernateSession: HibernateSession (108eff20): new, notReadonly, READ_WRITE_NEW, notActiveTransaction, session (4a9d61fa)
      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.hibernate.ByObjectStatic.saveOrUpdate(ByObjectStatic.java:363)
      at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3AuditEntryDAO.saveOrUpdate(Hib3AuditEntryDAO.java:47)
      at edu.internet2.middleware.grouper.audit.AuditEntry.saveOrUpdate(AuditEntry.java:337)
      at edu.internet2.middleware.grouper.Member$1.callback(Member.java:894)
      at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:701)
      at edu.internet2.middleware.grouper.Member.changeSubjectHelper(Member.java:600)
      at edu.internet2.middleware.grouper.Member.changeSubject(Member.java:500)
      at edu.internet2.middleware.grouper.Member.changeSubject(Member.java:483)
      at edu.internet2.middleware.grouper.member.TestMemberChangeSubject.testChangeSubjectDidExist(TestMemberChangeSubject.java:388)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at edu.internet2.middleware.grouper.member.TestMemberChangeSubject.main(TestMemberChangeSubject.java:77)
      Caused by: org.hibernate.exception.ConstraintViolationException: could not execute batch,
      Exception in save: edu.internet2.middleware.grouper.audit.AuditEntry, edu.internet2.middleware.grouper.hibernate.ByObject@10d9212b
      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:611)
      at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:456)
      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:1282)
      at edu.internet2.middleware.grouper.hibernate.ByObject.saveOrUpdate(ByObject.java:390)
      at edu.internet2.middleware.grouper.hibernate.ByObjectStatic$5.callback(ByObjectStatic.java:376)
      at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:701)
      ... 23 more
      Caused by: java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (`grouper_v2_4`.`grouper_attribute_assign`, CONSTRAINT `fk_attr_assign_owner_member_id` FOREIGN KEY (`owner_member_id`) REFERENCES `grouper_members` (`id`))
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
      at com.mysql.jdbc.Util.getInstance(Util.java:408)
      at com.mysql.jdbc.SQLError.createBatchUpdateException(SQLError.java:1163)
      at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1778)
      at com.mysql.jdbc.PreparedStatement.executeBatchInternal(PreparedStatement.java:1262)
      at com.mysql.jdbc.StatementImpl.executeBatch(StatementImpl.java:970)
      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)
      ... 34 more
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`grouper_v2_4`.`grouper_attribute_assign`, CONSTRAINT `fk_attr_assign_owner_member_id` FOREIGN KEY (`owner_member_id`) REFERENCES `grouper_members` (`id`))
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
      at com.mysql.jdbc.Util.getInstance(Util.java:408)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2484)
      at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
      at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2079)
      at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1756)

        Attachments

          Activity

            People

            Assignee:
            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            Reporter:
            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