Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-1064

HHH-4695 Some annotations tests in IndexedCollectionTest fail due to "foreign key constraint" failure on MySQL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • TBD
    • 4.2.0.GA_CP04, 4.3.0.GA_CP02, 4.3.0.GA_CP02_FP01, EAP 5.0.0, 4.2.0.GA_CP08, 4.3.0.GA_CP07
    • Hibernate
    • None
    • Annotations 3.2.1 GA and MySQL 5.0.5

    • Not Required

      Test following tests are failing due to "foreign key constraint fail" in MySQL:

      org.hibernate.test.annotations.indexcoll.IndexedCollectionTest.testDefaultMapKey
      org.hibernate.test.annotations.indexcoll.IndexedCollectionTest.testMapKeyToEntity
      org.hibernate.test.annotations.indexcoll.IndexedCollectionTest.testComponentSubPropertyMapKey
      org.hibernate.test.annotations.indexcoll.IndexedCollectionTest.testMapKeyEntityEntity

      Sample stack trace of the failure:
      org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
      at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:254)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
      at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
      at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
      at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
      at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
      at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
      at org.hibernate.test.annotations.indexcoll.IndexedCollectionTest.testDefaultMapKey(Unknown Source)
      at org.hibernate.test.annotations.TestCase.runTest(Unknown Source)
      Caused by: java.sql.BatchUpdateException: Cannot add or update a child row: a foreign key constraint fails (`platformae/addressentry`, CONSTRAINT `FK181B28FE1355AC4A` FOREIGN KEY (`firstname`, `lastname`) REFERENCES `addressentry` (`firstname`, `lastname`))
      at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:665)
      at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
      at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:247)

      http://opensource.atlassian.com/projects/hibernate/browse/HHH-4695

            shaozliu Strong Liu(刘少壮) (Inactive)
            jpkroehling@redhat.com Juraci Paixão Kröhling (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: