Hi Matthieu,

Thanks for your quick reply.

It would be of great help if you provide me the binaries.But will that truck
be a stable one as of ODE 1.2 Release? Also it would be nice if you explain
why this happens?. We are using MySQL 3.23, is it a problem? or do we need
to include any thread pool size configuration? Because i read from the
mailer list that if we provide a ode-jbi.threads.pool.size=1 then it wouldnt
occur. 

Looking forward to your reply...

Thanks in Advance

Regards,
Matheswaran N



Matheswaran Nachimuthu wrote:
> 
> Hi, 
> 
> As you have already suggested, i have migrated from Ode 1.1.1 to ode1.2
> and the backend is MySQL 3.23 When we give one request, then it is working
> fine but if we give 15-20 parallel request to the orch engine. Then we get
> the OptimisticLock exception. Please help me out to narrow down to the
> issue. 
> 
> Thanks in Advance! 
> 
> Regards, 
> Matheswaran N 
> 
> 
> Stacktrace : 
> 
> 
> MESSAGE: Not Authenticated 
> 2009-04-01 11:52:44,473 [openjpa.Runtime] -An exception occurred while
> ending the transaction.  This exception will be re-thrown. 
> <openjpa-1.1.0-r422266:657916 nonfatal store error>
> org.apache.openjpa.util.OptimisticException: Optimistic locking errors
> were detected when flushing to the data store.  The following objects may
> have been concurrently modified in another transaction:
> [org.apache.ode.dao.jpa.MessageRouteDAOImpl-org.apache.ode.dao.jpa.MessageRouteDAOImpl-668]
>  
>         at
> org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2157) 
>         at
> org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2007) 
>         at
> org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1905) 
>         at
> org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1823) 
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
>  
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:498)
>  
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
>  
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
>  
>         at
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:238)
>  
>         at
> org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:181)
>  
>         at
> org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:335)
>  
>         at
> org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:332)
>  
>         at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) 
>         at java.util.concurrent.FutureTask.run(FutureTask.java:123) 
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>  
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>  
>         at java.lang.Thread.run(Thread.java:595) 
> Caused by: <openjpa-1.1.0-r422266:657916 nonfatal store error>
> org.apache.openjpa.util.OptimisticException: An optimistic lock violation
> was detected when flushing object instance
> "org.apache.ode.dao.jpa.MessageRouteDAOImpl-org.apache.ode.dao.jpa.MessageRouteDAOImpl-668"
> to the data store.  This indicates that the object was concurrently
> modified in another transaction. 
> FailedObject:
> org.apache.ode.dao.jpa.MessageRouteDAOImpl-org.apache.ode.dao.jpa.MessageRouteDAOImpl-668
>  
>         at
> org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:124)
>  
>         at
> org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:82)
>  
>         at
> org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:89)
>  
>         at
> org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:72)
>  
>         at
> org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:543)
>  
>         at
> org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:119)
>  
>         at
> org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:56)
>  
>         at
> org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:89)
>  
>         at
> org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:72)
>  
>         at
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:549)
>  
>         at
> org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)
>  
>         ... 16 more 
> 2009-04-01 11:52:44,477 [Transaction] -Unexpected exception from
> beforeCompletion; transaction will roll back 
> <openjpa-1.1.0-r422266:657916 nonfatal 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:
> [org.apache.ode.dao.jpa.MessageRouteDAOImpl-org.apache.ode.dao.jpa.MessageRouteDAOImpl-668]
>  
>         at
> org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2157) 
>         at
> org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2007) 
>         at
> org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1905) 
>         at
> org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1823) 
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
>  
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:498)
>  
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
>  
>         at
> org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
>  
>         at
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:238)
>  
>         at
> org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:181)
>  
>         at
> org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:335)
>  
>         at
> org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:332)
>  
>         at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) 
>         at java.util.concurrent.FutureTask.run(FutureTask.java:123) 
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>  
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>  
>         at java.lang.Thread.run(Thread.java:595) 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/org.apache.openjpa.util.OptimisticException%3A-Optimistic-locking-errors-were-detected-when-flushing-to-the-data-store-tp22847957p22849716.html
Sent from the Apache Ode Dev mailing list archive at Nabble.com.

Reply via email to