[jboss-user] [jBPM] - I am facing dealock in concurrent scenarios

Sachin Francis do-not-reply at jboss.com
Tue Nov 27 06:20:22 EST 2012


Sachin Francis [https://community.jboss.org/people/sachin.francis] created the discussion

"I am facing dealock in concurrent scenarios"

To view the discussion, visit: https://community.jboss.org/message/778546#778546

--------------------------------------------------------------
I am doing create and start of a process, with persistence enabled, in tomcat 7 and oracle DB.

I am doing the operation in 300 concurrent threads.

Randomly i get the following error.

Could someone help me in this?


Please find the trace below


63670 27/11 17:11:02,138[http-8080-Processor1236] ERROR drools.persistence.SingleSessionCommandService.rollbackTransaction  - Could not commit session
java.lang.RuntimeException: Unable to commit transaction
 at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:182)
 at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:348)
 at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223)
 at com.xxxxx.bpm.test.util.JBPMManager.createAndProcessWithSetVariable(JBPMManager.java:63)
 at org.apache.jsp.jsp.createProcess_jsp._jspService(createProcess_jsp.java:82)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
 at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
 at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
 at java.lang.Thread.run(Thread.java:662)
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.LockAcquisitionException: Could not execute JDBC batch update
 at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
 at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:513)
 at bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent(BitronixTransaction.java:478)
 at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:193)
 at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:120)
 at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:179)
 ... 24 more
Caused by: org.hibernate.exception.LockAcquisitionException: Could not execute JDBC batch update
 at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:110)
 at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
 at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
 at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
 at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
 at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
 at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
 at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1028)
 at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:366)
 at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:504)
 ... 28 more
Caused by: java.sql.BatchUpdateException: ORA-00060: deadlock detected while waiting for resource
 at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:674)
 at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9394)
 at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:211)
 at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
 at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
 at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
 ... 35 more
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/778546#778546]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121127/0320d8e9/attachment.html 


More information about the jboss-user mailing list