Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » NPE in CascadeLockingPolicy.initUnmappedFieldsQuery
NPE in CascadeLockingPolicy.initUnmappedFieldsQuery [message #949858] Fri, 19 October 2012 07:21 Go to next message
Eclipse UserFriend
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 08:32 Go to previous messageGo to next message
Eclipse UserFriend
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 14:19 Go to previous messageGo to next message
Eclipse UserFriend
This is a concurrency bug in the CascadeLockingPolicy. Are you using cascading locking in your model?
Re: NPE in CascadeLockingPolicy.initUnmappedFieldsQuery [message #965734 is a reply to message #964688] Wed, 31 October 2012 09:15 Go to previous message
Eclipse UserFriend
(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: Tue Jul 22 22:40:19 EDT 2025

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

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

Back to the top