1 Reply Latest reply on Apr 18, 2006 3:24 PM by Andy McCarty

    jbpm transaction issues

    Andy McCarty Newbie

      I am getting the following error closing JbpmContexts in a different order than created.
      Every action creates a new jbpmContext and closes it when it is done in the same function call. There should not be any overlapping contexts. But I continue to get the error.

      I am not sure what to do. I changed my bean to @Stateless hoping to solve it but to no avail. I am using jbpm-3.1 on jboss-4.0.4CR2. I am very new to both and any help would be very appreciated.

      The jbpm config was change to the following without any success:

      <service name="persistence">
       <factory>
       <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
       <field name="isTransactionEnabled"><false/></field>
       </bean>
       </factory>
       </service>
      


      I don't understand the "try-finally". Should I wrap the error and ignore it?

      
      Caused by: javax.ejb.EJBException: java.lang.RuntimeException: javax.ejb.EJBTransactionRolledbackException: org.jbpm.JbpmException: closed JbpmContext in different order then they were created... check your try-finally's around JbpmContexts blocks
       at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:192)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:199)
       at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
       at $Proxy81.startNewSf182(Unknown Source)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
       ... 29 more
      
      
      
      
      


        • 1. Re: jbpm transaction issues
          Andy McCarty Newbie

          I posted the wrong jpbm.cfg.xml. The previous post is from a seam example.. sorry

          here is the correct one.

           <service name="persistence">
           <factory>
           <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
           <field name="isTransactionEnabled">
           <boolean value="false"/>
           </field>
           </bean>
           </factory>
           </service>
          


          Andy