openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hal Hildebrand <hal.hildebr...@me.com>
Subject Re: Getting a Optimistic locking error when openjpa.LockManager is set to pessimistic
Date Thu, 22 Oct 2015 15:08:55 GMT
It means you are using optimistic concurrency control with JPA, and that a modification has
been detected that aborted the transaction.  Something modified what you were reading in another
txn, and - well - this txn tried to commit and found a different version for something it
depended upon in the txn.  Thus the error.

> On Oct 22, 2015, at 5:33 AM, Leonardo K. Shikida <shikida@gmail.com> wrote:
> 
> Hi
> 
> I've got this error in my web app.
> 
> <openjpa-2.3.0-nonfinal-1540826-r422266:1542644 fatal store error>
> org.apache.openjpa.persistence.OptimisticLockException: Optimistic locking
> errors were detected when flushing to the data store.  The following
> objects may have been concurrently modified in another transaction:
> [com.ericsson.neas.tomee.entity.DriverJob-516036]
>        at
> org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2359)
>        at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2207)
>        at
> org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2105)
>        at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1876)
>        at
> org.apache.openjpa.kernel.QueryImpl.isInMemory(QueryImpl.java:973)
>        at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:853)
>        at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:794)
>        at
> org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
>        at
> org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:275)
>        at
> org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:291)
>        at
> org.apache.openjpa.persistence.QueryImpl.getSingleResult(QueryImpl.java:319)
> 
> but openjpa.LockManager is set to pessimistic
> 
> what does it mean and how can I avoid it?
> 
> []
> 
> Leo


Mime
View raw message