ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <boisv...@intalio.com>
Subject Re: Lock exceptions
Date Wed, 18 Feb 2009 23:59:05 GMT
Short answer:  Use MySQL (with InnoDB) or any database with MVCC
capabilities.


On Wed, Feb 18, 2009 at 3:47 PM, Andi Abes <aabes@progress.com> wrote:

> Setting - ODE 1.2, Tomcat, Derby JPA (out of box config).
>
>
>
> I'm getting the following in the log...Any pointers?
>
>
>
> The BPEL process uses a for-each (parallel = yes) loop to invoke a few
> instances in parallel (5 in this case) and correlate responses which are
> performed using 1-way invocations into the BPEL engine.
>
> The exceptions start showing up shortly after the last response was sent
> back from the called services.
>
>
>
>
>
> WARN - GeronimoLog.warn(96) | connectionErrorOccurred called with null
>
> java.sql.SQLException: A lock could not be obtained due to a deadlock,
> cycle of locks and waiters is:
>
> Lock : ROW, ODE_JOB, (1,7)
>
>  Waiting XID : {522, X} , SA, delete from ODE_JOB where jobid = ? and
> nodeid = ?
>
>  Granted XID : {512, X}
>
> Lock : ROW, ODE_JOB, (1,21)
>
>  Waiting XID : {512, X} , SA, delete from ODE_JOB where jobid = ? and
> nodeid = ?
>
>  Granted XID : {522, X}
>
> . The selected victim is XID : 522.
>
>            at
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
> Source)
>
>            at
> org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
>
>            at
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Un
> known Source)
>
>            at
> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unkno
> wn Source)
>
>            at
> org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown
> Source)
>
>            at
> org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown
> Source)
>
>            at
> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
> Source)
>
>            at
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unkno
> wn Source)
>
>            at
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown
> Source)
>
>            at
> org.tranql.connector.jdbc.PreparedStatementHandle.executeUpdate(Prepared
> StatementHandle.java:103)
>
>            at
> org.apache.ode.scheduler.simple.JdbcDelegate.deleteJob(JdbcDelegate.java
> :92)
>
>            at
> org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler
> .java:339)
>
>            at
> org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler
> .java:336)
>
>            at
> org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleSc
> heduler.java:174)
>
>            at
> org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.j
> ava:335)
>
>            at
> org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.j
> ava: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(ThreadPoolExecuto
> r.java:650)
>
>            at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
> va:675)
>
>            at java.lang.Thread.run(Thread.java:595)
>
> Caused by: ERROR 40001: A lock could not be obtained due to a deadlock,
> cycle of locks and waiters is:
>
> Lock : ROW, ODE_JOB, (1,7)
>
>  Waiting XID : {522, X} , SA, delete from ODE_JOB where jobid = ? and
> nodeid = ?
>
>  Granted XID : {512, X}
>
> Lock : ROW, ODE_JOB, (1,21)
>
>  Waiting XID : {512, X} , SA, delete from ODE_JOB where jobid = ? and
> nodeid = ?
>
>  Granted XID : {522, X}
>
> . The selected victim is XID : 522.
>
>            at
> org.apache.derby.iapi.error.StandardException.newException(Unknown
> Source)
>
>            at
> org.apache.derby.impl.services.locks.Deadlock.buildException(Unknown
> Source)
>
>            at
> org.apache.derby.impl.services.locks.ConcurrentLockSet.lockObject(Unknow
> n Source)
>
>            at
> org.apache.derby.impl.services.locks.AbstractPool.lockObject(Unknown
> Source)
>
>            at
> org.apache.derby.impl.services.locks.ConcurrentPool.lockObject(Unknown
> Source)
>
>            at
> org.apache.derby.impl.store.raw.xact.RowLocking3.lockRecordForWrite(Unkn
> own Source)
>
>            at
> org.apache.derby.impl.store.access.heap.HeapController.lockRow(Unknown
> Source)
>
>            at
> org.apache.derby.impl.store.access.heap.HeapController.lockRow(Unknown
> Source)
>
>            at
> org.apache.derby.impl.store.access.btree.index.B2IRowLocking3.lockRowOnP
> age(Unknown Source)
>
>            at
> org.apache.derby.impl.store.access.btree.index.B2IRowLocking3._lockScanR
> ow(Unknown Source)
>
>            at
> org.apache.derby.impl.store.access.btree.index.B2IRowLockingRR.lockScanR
> ow(Unknown Source)
>
>            at
> org.apache.derby.impl.store.access.btree.BTreeForwardScan.fetchRows(Unkn
> own Source)
>
>            at
> org.apache.derby.impl.store.access.btree.BTreeScan.fetchNext(Unknown
> Source)
>
>            at
> org.apache.derby.impl.sql.execute.TableScanResultSet.getNextRowCore(Unkn
> own Source)
>
>            at
> org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.getNextRowC
> ore(Unknown Source)
>
>            at
> org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCor
> e(Unknown Source)
>
>            at
> org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCor
> e(Unknown Source)
>
>            at
> org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(Unkno
> wn Source)
>
>            at
> org.apache.derby.impl.sql.execute.DeleteResultSet.setup(Unknown Source)
>
>            at
> org.apache.derby.impl.sql.execute.DeleteResultSet.open(Unknown Source)
>
>            at
> org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown
> Source)
>
>            ... 15 more
>
> ERROR - GeronimoLog.error(108) | Unexpected exception rolling back
> org.apache.geronimo.connector.outbound.LocalXAResource@109dafc;
> continuing with rollback
>
> javax.transaction.xa.XAException
>
>            at
> org.apache.geronimo.connector.outbound.LocalXAResource.rollback(LocalXAR
> esource.java:88)
>
>            at
> org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResource
> s(TransactionImpl.java:581)
>
>            at
> org.apache.geronimo.transaction.manager.TransactionImpl.rollback(Transac
> tionImpl.java:475)
>
>            at
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(
> TransactionManagerImpl.java:250)
>
>            at
> org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleSc
> heduler.java:183)
>
>            at
> org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.j
> ava:335)
>
>            at
> org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.j
> ava: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(ThreadPoolExecuto
> r.java:650)
>
>            at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
> va:675)
>
>            at java.lang.Thread.run(Thread.java:595)
>
> Caused by: Unable to rollback
>
>            at
> org.tranql.connector.jdbc.ManagedJDBCConnection.localTransactionRollback
> (ManagedJDBCConnection.java:113)
>
>            at
> org.tranql.connector.AbstractManagedConnection$LocalTransactionImpl.roll
> back(AbstractManagedConnection.java:196)
>
>            at
> org.apache.geronimo.connector.outbound.LocalXAResource.rollback(LocalXAR
> esource.java:86)
>
>            ... 11 more
>
> Caused by: java.sql.SQLException: No current connection.
>
>            at
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
> Source)
>
>            at
> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
>
>            at
> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
>
>            at
> org.apache.derby.impl.jdbc.Util.noCurrentConnection(Unknown Source)
>
>            at
> org.apache.derby.impl.jdbc.EmbedConnection.checkIfClosed(Unknown Source)
>
>            at
> org.apache.derby.impl.jdbc.EmbedConnection.setupContextStack(Unknown
> Source)
>
>            at
> org.apache.derby.impl.jdbc.EmbedConnection.rollback(Unknown Source)
>
>            at
> org.tranql.connector.jdbc.ManagedJDBCConnection.localTransactionRollback
> (ManagedJDBCConnection.java:111)
>
>            ... 13 more
>
> ERROR - GeronimoLog.error(108) | Error while executing transaction
>
> javax.transaction.SystemException
>
>            at
> org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResource
> s(TransactionImpl.java:585)
>
>            at
> org.apache.geronimo.transaction.manager.TransactionImpl.rollback(Transac
> tionImpl.java:475)
>
>            at
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(
> TransactionManagerImpl.java:250)
>
>            at
> org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleSc
> heduler.java:183)
>
>            at
> org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.j
> ava:335)
>
>            at
> org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.j
> ava: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(ThreadPoolExecuto
> r.java:650)
>
>            at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
> va:675)
>
>            at java.lang.Thread.run(Thread.java:595)
>
>
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message