Community
Participate
Working Groups
With 2.3.0.v20110518-r9407, org.eclipse.persistence.testing.tests.unitofwork.LockOnCloneDeadlockAvoidanceTest in UnitOfWorkIsolatedAlwaysTestModel failed on JDK 1.7(build 1.7.0-ea-b139), it threw NPE during resetting. This is an regression. The test passed with 2.3.0.v20110516-r9382. Stack Trace: ============ Exception Description: Problem in the reset method of the test Internal Exception: java.lang.NullPointerException Local Exception Stack: Exception [EclipseLink-0] (Eclipse Persistence Services - 2.3.0.v20110518-r9407): org.eclipse.persistence.testing.framework.TestProblemException Exception Description: Problem in the reset method of the test Internal Exception: java.lang.NullPointerException at org.eclipse.persistence.testing.framework.TestCase.execute(TestCase.java:183) at org.eclipse.persistence.testing.framework.TestCase.runBare(TestCase.java:265) at org.eclipse.persistence.testing.framework.TestExecutor.execute(TestExecutor.java:248) at org.eclipse.persistence.testing.framework.TestModel.execute(TestModel.java:208) at org.eclipse.persistence.testing.framework.TestCollection.run(TestCollection.java:313) at org.eclipse.persistence.testing.framework.TestExecutor.execute(TestExecutor.java:248) at org.eclipse.persistence.testing.framework.TestModel.execute(TestModel.java:208) at org.eclipse.persistence.testing.framework.TestCollection.run(TestCollection.java:313) Caused by: java.lang.NullPointerException at java.util.TreeMap.compare(TreeMap.java:1188) at java.util.TreeMap.put(TreeMap.java:531) at org.eclipse.persistence.internal.sessions.CommitManager.sort(CommitManager.java:351) at org.eclipse.persistence.internal.sessions.CommitManager.deleteAllObjects(CommitManager.java:312) at org.eclipse.persistence.internal.sessions.CommitManager.deleteAllObjects(CommitManager.java:283) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1410) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1493) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitRootUnitOfWork(UnitOfWorkImpl.java:1317) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commit(UnitOfWorkImpl.java:1079) at org.eclipse.persistence.testing.tests.unitofwork.LockOnCloneDeadlockAvoidanceTest.reset(LockOnCloneDeadlockAvoidanceTest.java:82) at org.eclipse.persistence.testing.framework.TestCase.tearDown(TestCase.java:244) at org.eclipse.persistence.testing.framework.TestCase.execute(TestCase.java:174)
The regression is related to David Minsky's check-in(for bug 331164) on revision 9403.
Discussed with Gordon: LockOnCloneDeadlockAvoidanceTest fails on JDK1.7, but not on JDK1.6 as the JDK1.7 TreeMap throws an NPE when put(Object, Object) is invoked with null, (ConcurrentPerson instance) respectively. Upon further inspection, the cached 'person' attribute in LockOnCloneDeadlockAvoidanceTest has a null primary key, and the JDK1.7 failure is exposing this testing problem. To resolve this, we should instead cache the object returned from the uow registration call.
Created attachment 197137 [details] Proposed fix
Fixed in 2.3 revision: 9495
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink