Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » NPE in CascadeLockingPolicy.initUnmappedFieldsQuery
NPE in CascadeLockingPolicy.initUnmappedFieldsQuery [message #949858] Fri, 19 October 2012 11:21 Go to next message
Jorg Heymans is currently offline Jorg Heymans
Messages: 26
Registered: July 2009
Location: Belgium
Junior Member
Hi,

We are seeing strange behaviour in our application whereby the first time after the application starts and we try to persist a new JPA entity using entitymgr.persist() the following stacktrace occurs

Caused by: java.lang.NullPointerException: null
        at org.eclipse.persistence.internal.descriptors.CascadeLockingPolicy.initUnmappedFieldsQuery(CascadeLockingPolicy.java:242) ~[eclips
elink-2.3.3.jar:2.3.3.v20120629-r11760]
        at org.eclipse.persistence.internal.descriptors.CascadeLockingPolicy.initUnmappedFields(CascadeLockingPolicy.java:217) ~[eclipselink
-2.3.3.jar:2.3.3.v20120629-r11760]
        at org.eclipse.persistence.internal.descriptors.CascadeLockingPolicy.lockNotifyParent(CascadeLockingPolicy.java:273) ~[eclipselink-2
.3.3.jar:2.3.3.v20120629-r11760]
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.calculateChanges(UnitOfWorkImpl.java:651) ~[eclipselink-2.3.3.jar:2.3.3.
v20120629-r11760]
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1490) ~[eclipselink-2.
3.3.jar:2.3.3.v20120629-r11760]
        at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:267) ~[ec
lipselink-2.3.3.jar:2.3.3.v20120629-r11760]
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1143) ~[eclipselink-2.3.3.jar:2.3.3.
v20120629-r11760]
        at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:84) ~[eclipselin
k-2.3.3.jar:2.3.3.v20120629-r11760]
        ... 53 common frames omitted


This is reproducible using eclipselink 2.3.3 and 2.4.0 and 2.4.1, did not try any other versions. Our application is deployed on WLS 10.3.4 and uses Spring 3.1 with the JpaTransactionManager. It is not related to a particular JPA entity, whatever the use case is we're executing - if it is the first time that a JPA entity needs to be saved we get the exception. After this first time everything works as normally.

If there is anything i can do to provide more debug info for this let me know, it's perfectly reproducible. The only thing i cannot provide easily is an isolated testcase.

Thanks !
Jorg
Re: NPE in CascadeLockingPolicy.initUnmappedFieldsQuery [message #956339 is a reply to message #949858] Wed, 24 October 2012 12:32 Go to previous messageGo to next message
Jorg Heymans is currently offline Jorg Heymans
Messages: 26
Registered: July 2009
Location: Belgium
Junior Member
created a ticket here, hopefully someone can confirm this

https://bugs.eclipse.org/bugs/show_bug.cgi?id=392536
Re: NPE in CascadeLockingPolicy.initUnmappedFieldsQuery [message #964688 is a reply to message #956339] Tue, 30 October 2012 18:19 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

This is a concurrency bug in the CascadeLockingPolicy. Are you using cascading locking in your model?


James : Wiki : Book : Blog : Twitter
Re: NPE in CascadeLockingPolicy.initUnmappedFieldsQuery [message #965734 is a reply to message #964688] Wed, 31 October 2012 13:15 Go to previous message
Jorg Heymans is currently offline Jorg Heymans
Messages: 26
Registered: July 2009
Location: Belgium
Junior Member
(discussion continues in the bugzilla ticket)
Previous Topic:@MappedSuperClass with DynamicEntity
Next Topic:EntityManager.find(...) with pessimistic lock never throws LockTimeoutException
Goto Forum:
  


Current Time: Thu Oct 23 13:19:13 GMT 2014

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

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