Issue Details (XML | Word | Printable)

Key: NUCCORE-615
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Testcase Required Testcase Required
Assignee: Unassigned
Reporter: Luc Claes
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Core

NPE on NucleusOptimisticException in JDOTransaction.commit()

Created: 16/Dec/10 01:02 PM   Updated: 01/Feb/11 08:35 PM   Resolved: 25/Jan/11 02:54 PM
Component/s: Transactions
Affects Version/s: 2.1.2
Fix Version/s: None

Datastore: MySQL

 Description  « Hide
An NPE can occur in the NucleusOptimisticException in JDOTransaction.commit() if the exception doesn't contain any nested exception.

The Exception object:
ex org.datanucleus.exceptions.NucleusOptimisticException (id=105)
cause org.datanucleus.exceptions.NucleusOptimisticException (id=105)
detailMessage "Object "com.contactoffice.messaging.jdo.MailFolder@1056bdd" (id="564[OID]com.contactoffice.messaging.jdo.MailFolder") has been changed in the datastore since your last read. Your transaction is using version "3" but this doesnt exist in the datastore now" (id=108)
failed com.contactoffice.messaging.jdo.MailFolder (id=109)
fatal false
nested null
stackTrace java.lang.StackTraceElement[44] (id=113)

The code:
// Optimistic exceptions - return a single JDOOptimisticVerificationException
// with all individual exceptions nested
Throwable[] nested = ex.getNestedExceptions(); --> nested is null
JDOOptimisticVerificationException[] jdoNested = new JDOOptimisticVerificationException[nested.length]; --> NPE

Andy Jefferson added a comment - 16/Dec/10 03:31 PM
And please define how this comes up ? Since all of our tests don't do that, nor does the JDO TCK, so it is some other situation and I don't want to apply downstream fixes so want to understand the situation ... and with current versions too

Andy Jefferson made changes - 16/Dec/10 03:31 PM
Field Original Value New Value
Priority Minor [ 4 ] Incomplete [ 6 ]
Andy Jefferson added a comment - 25/Jan/11 02:54 PM
No testcase defined, so no way of seeing it.

Andy Jefferson made changes - 25/Jan/11 02:54 PM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Cannot Reproduce [ 5 ]
Andy Jefferson made changes - 01/Feb/11 08:35 PM
Status Resolved [ 5 ] Closed [ 6 ]