openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo K. Shikida" <shik...@gmail.com>
Subject Re: Getting a Optimistic locking error when openjpa.LockManager is set to pessimistic
Date Fri, 23 Oct 2015 11:07:26 GMT
how can I avoid it?

[]

Leo

On Thu, Oct 22, 2015 at 1:08 PM, Hal Hildebrand <hal.hildebrand@me.com>
wrote:

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message