]
Gail Badner commented on HHH-4695:
----------------------------------
I believe this is a duplicate of HHH-4283 /
Some annotations tests in IndexedCollectionTest fail due to
"foreign key constraint" failure on MySQL InnoDB
-------------------------------------------------------------------------------------------------------------
Key: HHH-4695
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4695
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.2.4.sp1, 3.3.2, 3.5.0.Beta-1, 3.5.0-Beta-2
Environment: MySQL InnoDB 5.0.x and 5.1.x
Reporter: Strong Liu
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)
---------
these testes only fail on MySQL5InnoDBDialect AND MySQLInnoDBDialect, they pass
MySQL5Dialect and MySQLDialect
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: