On Feb 9, 2011, at 12:19 PM, tjsaker wrote:

> Caused by: <openjpa-1.2.1-r752877:753278 nonfatal store error>
> org.apache.openjpa.util.OptimisticException: An optimistic lock violation
> was detected when flushing object instance "ejb.bo.Library@2d150f" to the
> data store.  This indicates that the object was concurrently modified in
> another transaction.
> FailedObject: ejb.bo.Library@2d150f
>        at
> org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:124)
>        at
> org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:82)

This is definitely the cause, not sure where the object might be getting 
modified outside the transaction.

I took a closer look at the source you posted and noticed you appear to be 
using JPA and not CMP.  Couple quick questions:

  - Are you intending to use JPA or CMP?  
  - Is this an existing app or a new app?


-David


  

  

Reply via email to