Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » unusual exceptionrelating relational descriptor
unusual exceptionrelating relational descriptor [message #384219] Thu, 04 December 2008 13:46 Go to next message
Milos is currently offline MilosFriend
Messages: 12
Registered: July 2009
Junior Member
I get the following exception during commiting of transaction.

Exception Description: A NullPointerException was thrown while extracting a
value from the instance variable [amount] in the object [null].
Internal Exception: java.lang.NullPointerException
Mapping:
org.eclipse.persistence.mappings.DirectToFieldMapping[amount -- >UNIT.AMOUNT]
Descriptor: RelationalDescriptor(com.test.Amount --> [DatabaseTable(UNIT)])

AMOUNT in UNIT table is mapped using Embedded object.

Here is underlying stacka trace


Descriptor:
RelationalDescriptor(com.antegra.banking.directdebit.instruc tion.plain.Amount
--> [DatabaseTable(DD1CALCULAT
ION_UNIT)])
at
org.eclipse.persistence.exceptions.DescriptorException.nullP ointerWhileGettingValueThruInstanceVariableAccess
or(DescriptorException.java:1232)
at
org.eclipse.persistence.internal.descriptors.InstanceVariabl eAttributeAccessor.getAttributeValueFromObject(In
stanceVariableAttributeAccessor.java:87)
at
org.eclipse.persistence.mappings.DatabaseMapping.getAttribut eValueFromObject(DatabaseMapping.java:429)
at
org.eclipse.persistence.mappings.foundation.AbstractDirectMa pping.compareObjects(AbstractDirectMapping.java:2
86)
at
org.eclipse.persistence.mappings.foundation.AbstractDirectMa pping.compareForChange(AbstractDirectMapping.java
:255)
at
org.eclipse.persistence.descriptors.changetracking.Attribute ChangeTrackingPolicy.createObjectChangeSet(Attrib
uteChangeTrackingPolicy.java:73)
at
org.eclipse.persistence.descriptors.changetracking.DeferredC hangeDetectionPolicy.calculateChanges(DeferredCha
ngeDetectionPolicy.java:80)
at
org.eclipse.persistence.internal.descriptors.ObjectBuilder.c ompareForChange(ObjectBuilder.java:1531)
at
org.eclipse.persistence.mappings.AggregateMapping.compareFor Change(AggregateMapping.java:297)
at
org.eclipse.persistence.descriptors.changetracking.Attribute ChangeTrackingPolicy.createObjectChangeSet(Attrib
uteChangeTrackingPolicy.java:73)
at
org.eclipse.persistence.descriptors.changetracking.DeferredC hangeDetectionPolicy.calculateChanges(DeferredCha
ngeDetectionPolicy.java:80)
at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.cal culateChanges(UnitOfWorkImpl.java:557)
at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.com mitToDatabaseWithChangeSet(UnitOfWorkImpl.java:13
20)
at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.iss ueSQLbeforeCompletion(UnitOfWorkImpl.java:2848)
at
org.eclipse.persistence.internal.sessions.RepeatableWriteUni tOfWork.issueSQLbeforeCompletion(RepeatableWriteU
nitOfWork.java:223)
at
org.eclipse.persistence.transaction.AbstractSynchronizationL istener.beforeCompletion(AbstractSynchronizationL
istener.java:157)
at
org.eclipse.persistence.transaction.JTASynchronizationListen er.beforeCompletion(JTASynchronizationListener.ja
va:68)
at
weblogic.transaction.internal.ServerSCInfo.doBeforeCompletio n(ServerSCInfo.java:1217)
at
weblogic.transaction.internal.ServerSCInfo.callBeforeComplet ions(ServerSCInfo.java:1195)
at
weblogic.transaction.internal.ServerSCInfo.startPrePrepareAn dChain(ServerSCInfo.java:118)
at
weblogic.transaction.internal.ServerTransactionImpl.localPre PrepareAndChain(ServerTransactionImpl.java:1302)
at
weblogic.transaction.internal.ServerTransactionImpl.globalPr ePrepare(ServerTransactionImpl.java:2114)
at
weblogic.transaction.internal.ServerTransactionImpl.internal Commit(ServerTransactionImpl.java:263)
... 37 more
Caused by: java.lang.NullPointerException
at
sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAcc essorImpl.java:36)
at
sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFi eldAccessorImpl.java:18)
at java.lang.reflect.Field.get(Field.java:358)
at
org.eclipse.persistence.internal.descriptors.InstanceVariabl eAttributeAccessor.getAttributeValueFromObject(In
stanceVariableAttributeAccessor.java:75)
... 58 more


Google wasn't of much help. I found a post on OTN forum regarding the same
problem, and it looks like there was same problem on TopLink 10.3. As for
official explanations, I found only:

ECLIPSELINK-00069: A NullPointerException was thrown while extracting a
value from the instance variable [{0}] in the object [{1}].
Cause: An object is accessed to get the value of an instance variable
through Java reflection. This exception is raised only on some JVMs.
Action: Inspect the internal exception, and refer to the Java
documentation.
Not very helpful.

I could use some info on this, because it is quite critical.

Thanks,
Milos
Re: unusual exceptionrelating relational descriptor [message #384224 is a reply to message #384219] Thu, 04 December 2008 14:24 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

See previous.

James : Wiki : Book : Blog : Twitter
Previous Topic:java.lang.NoSuchMethodError: com.MyClass._persistence_checkFetched
Next Topic:A NullPointerException was thrown while extracting a value from the instance variable [amount] in th
Goto Forum:
  


Current Time: Thu Nov 27 23:35:16 GMT 2014

Powered by FUDForum. Page generated in 0.01583 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software