|
Home > Archive > Apache JDO Project > July 2005 > JIRA-70 - jdoPreClear
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
JIRA-70 - jdoPreClear
|
|
| erik@jpox.org 2005-07-27, 5:45 pm |
|
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.
Regards,
Erik Bengtson
| |
| Craig Russell 2005-07-27, 5:45 pm |
| | |
| erik@jpox.org 2005-07-27, 5:45 pm |
| > 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 field is not in DFG
- The field access is not mediated (jdoPreClear)
Regards,
Erik Bengtson
Quoting Craig Russell <Craig.Russell@Sun.COM>:
> Hi Erik,
>
> On Jul 27, 2005, at 11:18 AM, erik@jpox.org 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.
>
> Regards,
>
> Craig
>
>
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>
>
| |
| Craig Russell 2005-07-27, 5:45 pm |
| | |
| erik@jpox.org 2005-07-27, 8:45 pm |
| Quoting Craig Russell <Craig.Russell@Sun.COM>:
>
> 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);
>
>
You are right, it's p-clean
>
>
> 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.
>
Sometime ago, in an earlier JDO 2, it was supposed to load the current fetch
plan only, and that's how jpox does today. The JDO API needs to be updated
before we go and change JPOX for the latest changes on the retrieve contract.
>
> So the children field should be loaded. And sadly, it's null.
>
I agree now that it should fix the issue. thx
[vbcol=seagreen]
> One other thing to look at. Is the children field mapped correctly?
>
> Craig
|
|
|
|
|