Hi Erik,

Here's the stack trace:
[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:987)
    [java]      at org.jpox.state.StateManagerImpl.clearNonPrimaryKeyFields(StateManagerImpl.java:976)
    [java]      at org.jpox.state.PersistentClean.transitionCommit(PersistentClean.java:82)
    [java]      at org.jpox.state.StateManagerImpl.postCommit(StateManagerImpl.java:3928)
    [java]      at org.jpox.AbstractPersistenceManager.postCommit(AbstractPersistenceManager.java:2963)
    [java]      at org.jpox.NonmanagedTransaction.commit(NonmanagedTransaction.java:477)
    [java]      at org.apache.jdo.tck.api.instancecallbacks.CallingJdoPreclear.test(CallingJdoPreclear.java:127)


On Jul 27, 2005, at 12:08 PM, [EMAIL PROTECTED] wrote:

Looking at the test case, I believe that the exception is due to a
bug in JPOX. I've looked at the code and the field that is accessed
should not be null.


Can you help me to understand why do you think so?

- The instance is p-deleted

The stack trace shows the instance is p-clean. So this is the secondaryObj. It was just navigated from the primaryObj and retrieve was called:
        secondaryObj = primaryObj.nextObj;
        if(secondaryObj == null) {
            fail(ASSERTION_FAILED, "Failed to find secondaryObj created in previous transaction using reference from primaryObj.");
            return;
        }
        pm.retrieve(secondaryObj);



- The field is not in DFG

So perhaps the problem is that retrieve() on line 117 didn't retrieve the children field. From the spec:

These methods request the PersistenceManager to load all persistent fields into the parameter instances. 

- The field access is not mediated (jdoPreClear)

So the children field should be loaded. And sadly, it's null.

One other thing to look at. Is the children field mapped correctly?

Craig

Regards,

Erik Bengtson

Quoting Craig Russell <[EMAIL PROTECTED]>:


Hi Erik,

On Jul 27, 2005, at 11:18 AM, [EMAIL PROTECTED] wrote:


Hi,

what is the expected resolution for item 70?

To remind, NullPointerException is happening while acessing a field
inside the
jdoPreClear in a P-Deleted instance.


Looking at the test case, I believe that the exception is due to a
bug in JPOX. I've looked at the code and the field that is accessed
should not be null.

Regards,

Craig



Regards,

Erik Bengtson



Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
P.S. A good JDO? O, Gasp!








Craig Russell

Architect, Sun Java Enterprise System http://java.sun.com/products/jdo

408 276-5638 mailto:[EMAIL PROTECTED]

P.S. A good JDO? O, Gasp!


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to