| Erik Bengtson (JIRA) 2005-09-27, 5:45 pm |
| [ http://issues.apache.org/jira/brows...action_12330601 ]
Erik Bengtson commented on JDO-70:
----------------------------------
> Hi Erik,
>
> On Jul 17, 2005, at 2:15 AM, erik@jpox.org wrote:
>
>
> Yes. The idea is that jdoPreClear cannot affect the persistent state
> of instances because it's called during afterCompletion. And the
> method is not enhanced so no one will ever know. The job of
> jdoPreClear is to do any cleanup of the instance that might be needed
> before it transitions to transient.
>
> Access to persistent fields (except for identity fields which can
> always be accessed) of deleted instances is detected by enhanced code
> that ends up calling the StateManager. While in jdoPreDelete, nothing
> that the method does is mediated, which is why it cannot call other
> methods that are enhanced!
>
> Craig
The jdoPreClear is trying to read a field in a pc-deleted instance. It's happening during tearDown as Andy said.
> NullPointerException in jdoPreClear
> -----------------------------------
>
> Key: JDO-70
> URL: http://issues.apache.org/jira/browse/JDO-70
> Project: JDO
> Type: Bug
> Components: tck20
> Environment: JPOX
> Reporter: Craig Russell
> Assignee: Erik Bengtson
>
> RUN CallingJdoPreclear.test ERROR
> [java] [FATAL] tck - Exception during setUp or runtest: <org.jpox.exceptions.CommitStateTransitionException: A database transaction has been committed, but the following exceptions were thrown while transitioning the state of the JDO objects partic
ipating in the transaction.
> [java] NestedThrowables:
> [java] java.lang.NullPointerException>org.jpox.exceptions.CommitStateTransitionException: A database transaction has been committed, but the following exceptions were thrown while transitioning the state of the JDO objects participating in the trans
action.
> [java] at org.jpox.AbstractPersistenceManager.postCommit(AbstractPersistenceManager.java:2846)
> [java] at org.jpox.NonmanagedTransaction.commit(NonmanagedTransaction.java:478)
> [java] at org.apache.jdo.tck.api.instancecallbacks.CallingJdoPreclear.test(CallingJdoPreclear.java:122)
> [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> [java] at java.lang.reflect.Method.invoke(Method.java:324)
> [java] at junit.framework.TestCase.runTest(TestCase.java:154)
> [java] at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:181)
> [java] at junit.framework.TestResult$1.protect(TestResult.java:106)
> [java] at junit.framework.TestResult.runProtected(TestResult.java:124)
> [java] at junit.framework.TestResult.run(TestResult.java:109)
> [java] at junit.framework.TestCase.run(TestCase.java:118)
> [java] at junit.framework.TestSuite.runTest(TestSuite.java:208)
> [java] at junit.framework.TestSuite.run(TestSuite.java:203)
> [java] at junit.framework.TestSuite.runTest(TestSuite.java:208)
> [java] at junit.framework.TestSuite.run(TestSuite.java:203)
> [java] at junit.textui.TestRunner.doRun(TestRunner.java:116)
> [java] at junit.textui.TestRunner.doRun(TestRunner.java:109)
> [java] at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:112)
> [java] at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:90)
> [java] NestedThrowablesStackTrace:
> [java] java.lang.NullPointerException
> [java] at org.apache.jdo.tck.pc.instancecallbacks.InstanceCallbackClass.jdoPreClear(InstanceCallbackClass.java:157)
> [java] at org.jpox.state.StateManagerImpl.clearFieldsByNumbers(StateManagerImpl.java:963)
> [java] at org.jpox.state.StateManagerImpl. clearNonPrimaryKeyFields(StateManagerImp
l.java:952)
> [java] at org.jpox.state.PersistentClean.transitionCommit(PersistentClean.java:82)
> [java] at org.jpox.state.StateManagerImpl.postCommit(StateManagerImpl.java:3706)
> [java] at org.jpox.AbstractPersistenceManager.postCommit(AbstractPersistenceManager.java:2832)
> [java] at org.jpox.NonmanagedTransaction.commit(NonmanagedTransaction.java:478)
> [java] at org.apache.jdo.tck.api.instancecallbacks.CallingJdoPreclear.test(CallingJdoPreclear.java:122)
> [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> [java] at java.lang.reflect.Method.invoke(Method.java:324)
> [java] at junit.framework.TestCase.runTest(TestCase.java:154)
> [java] at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:181)
> [java] at junit.framework.TestResult$1.protect(TestResult.java:106)
> [java] at junit.framework.TestResult.runProtected(TestResult.java:124)
> [java] at junit.framework.TestResult.run(TestResult.java:109)
> [java] at junit.framework.TestCase.run(TestCase.java:118)
> [java] at junit.framework.TestSuite.runTest(TestSuite.java:208)
> [java] at junit.framework.TestSuite.run(TestSuite.java:203)
> [java] at junit.framework.TestSuite.runTest(TestSuite.java:208)
> [java] at junit.framework.TestSuite.run(TestSuite.java:203)
> [java] at junit.textui.TestRunner.doRun(TestRunner.java:116)
> [java] at junit.textui.TestRunner.doRun(TestRunner.java:109)
> [java] at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:112)
> [java] at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:90)
> [java]
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secur...nistrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
|