<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Deadlocks in the JBPM4_EXECUTION
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/sacrm2011">sacrm2011</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/642318#642318">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p> Hello</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I'm having some problems with jBPM4.4.</p><p>My application is currently running on a 3-node cluster using an oracle database 11.2.0.2.0 and am using JBPM 4.4 as an orchestrator of the flow of navigation of the application.</p><p>At the beginning my application had&#160; some problems with competition but not as severe as today, since the load has been increase significantly.</p><p>I'm getting a lot of error messages in my logs:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>"2011-12-15 11:00:26,933 ERROR [org.hibernate.util.JDBCExceptionReporter] -&#160; ORA-00060: deadlock detected while waiting for resource</p><p>2011-12-15 11:00:26,934 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] -&#160; Could not synchronize database state with session </p><p>org.hibernate.exception.LockAcquisitionException: could not delete: [org.jbpm.pvm.internal.model.ExecutionImpl#20376624]</p><p>&#160;&#160;&#160; at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:110)</p><p>&#160;&#160;&#160; at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)</p><p>&#160;&#160;&#160; at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2569)</p><p>&#160;&#160;&#160; at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2725)</p><p>&#160;&#160;&#160; at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:97)</p><p>&#160;&#160;&#160; at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)</p><p>&#160;&#160;&#160; at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)</p><p>&#160;&#160;&#160; at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:172)</p><p>&#160;&#160;&#160; at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)</p><p>&#160;&#160;&#160; at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)</p><p>&#160;&#160;&#160; at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)</p><p>&#160;&#160;&#160; at org.jbpm.pvm.internal.tx.HibernateSessionResource.prepare(HibernateSessionResource.java:56)</p><p>&#160;&#160;&#160; at org.jbpm.pvm.internal.tx.StandardTransaction.commit(StandardTransaction.java:107)</p><p>&#160;&#160;&#160; at org.jbpm.pvm.internal.tx.StandardTransaction.complete(StandardTransaction.java:64)</p><p>&#160;&#160;&#160; at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:57)</p><p>&#160;&#160;&#160; at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)</p><p>&#160;&#160;&#160; at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)</p><p>&#160;&#160;&#160; at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56)</p><p>&#160;&#160;&#160; at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)</p><p>&#160;&#160;&#160; at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.signalExecutionById(ExecutionServiceImpl.java:89)</p><p>&#160;&#160;&#160; (...) "</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Looking in database logs found several sql statements/threads that I suspect are causing the deadlocks:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Query 1:</p><p>"delete from where JBPM4_EXECUTION DBID_ =: = 1 and DBVERSION_: 2;"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Query 2:</p><p>"update JBPM4_EXECUTION set </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; DBVERSION_=:1, ACTIVITYNAME_=:2, PROCDEFID_=:3, HASVARS_=:4, NAME_=:5, KEY_=:6, ID_=:7, STATE_=:8, SUSPHISTSTATE_=:9, </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; PRIORITY_=:10, HISACTINST_=:11, PARENT_=:12, INSTANCE_=:13, SUPEREXEC_=:14, SUBPROCINST_=:15 </p><p> where DBID_=:16 and DBVERSION_=:17; "</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Is this a concurrencial problem/limitation of jbpm or something else?</p><p>Any help would be greatly appreciated! </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Best regards</p><p>Afonso T.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/642318#642318">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>