I got a AssertionFailure by executing my programm. The exeception will be throwed in the class net.sf.hibernate.impl.ScheduledCollectionUpdate at the following code.
Code:
if ( !collection.wasInitialized() ) {
if ( !collection.hasQueuedAdditions() ) throw new AssertionFailure("bug processing queued adds");
//do nothing - we only need to notify the cache...
}
but i have not found how will the queuedAdditions be setted.
here is part of stack trace
Code:
Hibernate: update PERSON set forename=?, surname=? where PERSON_ID=?
10:25:49,776 INFO DriverManagerConnectionProvider:137 - cleaning up connection pool: jdbc:mysql://localhost/xytest
10:25:50,017 ERROR AssertionFailure:20 - An AssertionFailure occured - this may indicate a bug in Hibernate
net.sf.hibernate.AssertionFailure: bug processing queued adds
at net.sf.hibernate.impl.ScheduledCollectionUpdate.execute(ScheduledCollectionUpdate.java:36)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2303)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2259)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2182)
at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
at aspectwrap.service.HibernateDatabaseAccessAspect.doPersistenceAction(HibernateDatabaseAccessAspect.java:214)
at aspectwrap.service.HibernateDatabaseAccessAspect.ajc$after$aspectwrap_service_HibernateDatabaseAccessAspect$3$4ed52f8a(HibernateDatabaseAccessAspect.java:68)
at aspectwrap.handler.proxy.CollectionInterceptor.intercept(CollectionInterceptor.java:90)
at net.sf.hibernate.collection.List$$EnhancerByCGLIB$$79e904a0.add(<generated>)
at test.ComponentTest.test(ComponentTest.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:410)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:294)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:182)
Has someone any idea why the error occurs?
Thanks
Xiaoying