<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="&#1;" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-GB link=blue vlink=purple>

<div class=WordSection1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Esteban thanks for your reply. No we&#8217;re not using timers
at all. <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks for the advice on the correct list </span><span
style='font-size:11.0pt;font-family:Wingdings;color:#1F497D'>J</span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Darren<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> rules-dev-bounces@lists.jboss.org
[mailto:rules-dev-bounces@lists.jboss.org] <b>On Behalf Of </b>Esteban Aliverti<br>
<b>Sent:</b> 24 November 2010 11:55<br>
<b>To:</b> Rules Dev List<br>
<b>Subject:</b> Re: [rules-dev] Cannot synchronize database state with session<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Just wondering, does your process has timers?<o:p></o:p></p>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<div>

<p class=MsoNormal>By the way you should post this kind of emails in&nbsp;<a
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'>Best Regards,<br clear=all>
<br>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>
<br>
Esteban Aliverti<br>
- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com
</a><br>
- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
<br>
<o:p></o:p></p>

<div>

<p class=MsoNormal>On Tue, Nov 23, 2010 at 2:13 PM, &lt;<a
href="mailto:darren.kay@bt.com">darren.kay@bt.com</a>&gt; wrote:<o:p></o:p></p>

<p class=MsoNormal>Drools Version: 5.1.0<br>
JBoss Version: 5.1.0 GA (Clustered)<br>
<br>
We're using a clustered JBoss setup (with 2 nodes) with Drools and getting an
intermitten stale ksession exception - stack trace attached below.<br>
<br>
We use 'org.drools.persistence.jpa.JPAKnowledgeService' to persist
KnowledgeSession to a MySQL database and use Hibernate to manage the
transactions.<br>
<br>
In case of a new request, we create a new Drools Knowledge Session and persist
it and store the knowledge session id to our database.<br>
<br>
StatefulKnowledgeSession session =
JPAKnowledgeService.newStatefulKnowledgeSession(knowledgeBase, null,
environment);<br>
return session;<br>
<br>
For all subsequent requests we load the Knowledge session from the database
using the knowledge session id.<br>
<br>
StatefulKnowledgeSession session =
JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, knowledgeBase,
null, &nbsp; &nbsp; environment);<br>
return session;<br>
<br>
We receive request from the front-end validate the information and update the
knowledge session facts using;<br>
<br>
public void insertOrUpdateSessionFacts(StatefulKnowledgeSession session,
Object...objects) {<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp;boolean factMatched = false;<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp;for (Object obj: objects) {<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//get all session facts<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Collection&lt;Object&gt;
facts = session.getObjects();<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for (Object fact: facts)
{<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;if (fact.getClass().toString().equals(obj.getClass().toString())) {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//update fact in session<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;session.update(session.getFactHandle(fact),
obj);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;factMatched = true;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;}<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (factMatched) {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;factMatched = false;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} else {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;//fact not found, so insert new fact<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;session.insert(obj);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
&nbsp; &nbsp; &nbsp; &nbsp;}<br>
}<br>
<br>
After the facts are updated we use find the response variable populated from
the Drools flow and pass it back to the front-end;<br>
<br>
//get variable scope context<br>
VariableScopeInstance vi = (VariableScopeInstance)
processInstance.getContextInstance(VariableScope.VARIABLE_SCOPE);<br>
return vi.getVariable(variableName);<br>
<br>
Any pointers would be much appreciated. Stack Trace is below<br>
<br>
Darren<br>
<br>
2010-11-23 04:40:26,838 INFO &nbsp;[STDOUT] (pool-47-thread-1) Hibernate:
select workitemin0_.workItemId as workItemId92_0_, workitemin0_.creationDate as
creation2_92_0_, workitemin0_.externalVariables as external3_92_0_,
workitemin0_.name as name92_0_, workitemin0_.processInstanceId as
processI5_92_0_, workitemin0_.state as state92_0_, workitemin0_.OPTLOCK as
OPTLOCK92_0_, workitemin0_.workItemByteArray as workItem8_92_0_ from
WorkItemInfo workitemin0_ where workitemin0_.workItemId=?<br>
2010-11-23 04:40:26,841 INFO &nbsp;[STDOUT] (pool-47-thread-1) Hibernate:
select variables0_.workItemId as workItemId1_, variables0_.id as id1_,
variables0_.name as formula1_1_, variables0_.id as id94_0_, variables0_.name as
name94_0_, variables0_.persister as persister94_0_,
variables0_.processInstanceId as processI5_94_0_, variables0_.workItemId as
workItemId94_0_ from VariableInstanceInfo variables0_ where
variables0_.workItemId=?<br>
2010-11-23 04:40:26,857 INFO &nbsp;[STDOUT] (pool-47-thread-1) Hibernate:
update ProcessInstanceInfo set externalVariables=?, lastModificationDate=?,
lastReadDate=?, processId=?, processInstanceByteArray=?, startDate=?, state=?,
OPTLOCK=? where InstanceId=? and OPTLOCK=?<br>
2010-11-23 04:40:26,864 ERROR
[org.hibernate.event.def.AbstractFlushingEventListener] (pool-47-thread-1)
Could not synchronize database state with session<br>
org.hibernate.StaleObjectStateException: Row was updated or deleted by another
transaction (or unsaved-value mapping was incorrect):
[org.drools.persistence.processinstance.ProcessInstanceInfo#14]<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1792)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2435)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2335)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2635)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:115)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:504)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:101)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:269)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:89)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1423)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:137)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:170)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:261)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:421)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:85)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at $Proxy608.invoke(Unknown Source)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at $Proxy607.processKbdRequest(Unknown Source)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
net.plus.kbd.faults.gateway.actions.DroolsFlowSender.process(DroolsFlowSender.java:84)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at sun.reflect.GeneratedMethodAccessor807.invoke(Unknown
Source)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at java.lang.reflect.Method.invoke(Unknown Source)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processMethods(ActionProcessorMethodInfo.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor.process(OverriddenActionLifecycleProcessor.java:74)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:649)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:603)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:433)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:540)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at java.lang.Thread.run(Unknown Source)<br>
2010-11-23 04:40:26,871 WARN
&nbsp;[com.arjuna.ats.arjuna.logging.arjLoggerI18N] (pool-47-thread-1)
[com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2]
TwoPhaseCoordinator.beforeCompletion - failed for
com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@c9c803<br>
javax.persistence.OptimisticLockException:
org.hibernate.StaleObjectStateException: Row was updated or deleted by another
transaction (or unsaved-value mapping was incorrect):
[org.drools.persistence.processinstance.ProcessInstanceInfo#14]<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.ejb.AbstractEntityManagerImpl.wrapStaleStateException(AbstractEntityManagerImpl.java:630)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:588)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:513)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:101)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:269)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:89)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1423)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:137)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:170)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)<br>
at
org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:261)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:421)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:85)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at $Proxy608.invoke(Unknown Source)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at $Proxy607.processKbdRequest(Unknown Source)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
net.plus.kbd.faults.gateway.actions.DroolsFlowSender.process(DroolsFlowSender.java:84)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at sun.reflect.GeneratedMethodAccessor807.invoke(Unknown
Source)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at java.lang.reflect.Method.invoke(Unknown Source)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processMethods(ActionProcessorMethodInfo.java:102)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor.process(OverriddenActionLifecycleProcessor.java:74)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:649)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:603)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:433)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:540)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at java.lang.Thread.run(Unknown Source)<br>
Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted
by another transaction (or unsaved-value mapping was incorrect):
[org.drools.persistence.processinstance.ProcessInstanceInfo#14]<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1792)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2435)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2335)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2635)<br>
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:115)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:504)<br>
&nbsp; &nbsp; &nbsp; &nbsp;... 45 more<br>
<br>
<br>
<br>
_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><o:p></o:p></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</div>

</body>

</html>