2 Replies Latest reply on Jul 24, 2013 2:09 AM by thomas.setiabudi

    what causes Thread already associated with Transaction error Guvnor 5.5.0.Final ?

    thomas.setiabudi

      Hi,

       

      I use KnowledgeAgent to get process definition from guvnor for my JBPM project.

       

      However, randomly the Guvnor5.5.0.Final will run into error

       

       

      javax.enterprise.event.ObserverException
                sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
                sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
                java.lang.reflect.Constructor.newInstance(Constructor.java:525)
                java.lang.Class.newInstance0(Class.java:372)
                java.lang.Class.newInstance(Class.java:325)
                org.jboss.weld.util.reflection.SecureReflections$16.work(SecureReflections.java:343)
                org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
                org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInstantiation(SecureReflectionAccess.java:173)
                org.jboss.weld.util.reflection.SecureReflections.newInstance(SecureReflections.java:340)
                org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:33)
                org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:73)
                org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:162)
                org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:241)
                org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:229)
                org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:207)
                org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:569)
                org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:564)
                org.jboss.weld.event.EventImpl.fire(EventImpl.java:68)
                org.jboss.seam.transaction.TransactionServletListener.requestInitialized(TransactionServletListener.java:117)
                org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
                org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
                org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
                org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
                java.lang.Thread.run(Thread.java:722)
      
      
      root cause
      
      
      javax.transaction.NotSupportedException: BaseTransaction.checkTransactionState - ARJUNA016051: thread is already associated with a transaction!
                com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:63)
                com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.begin(BaseTransactionManagerDelegate.java:65)
                org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:142)
                org.jboss.seam.transaction.UTTransaction.begin(UTTransaction.java:51)
                org.jboss.seam.transaction.DefaultSeamTransaction.begin(DefaultSeamTransaction.java:88)
                org.jboss.seam.transaction.TransactionServletListener.requestInitialized(TransactionServletListener.java:110)
                org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
                org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
                org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
                org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
                java.lang.Thread.run(Thread.java:722)
      
      
      root cause
      
      
      java.lang.IllegalStateException: BaseTransaction.checkTransactionState - ARJUNA016051: thread is already associated with a transaction!
                com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.checkTransactionState(BaseTransaction.java:257)
                com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:59)
                com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.begin(BaseTransactionManagerDelegate.java:65)
                org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:142)
                org.jboss.seam.transaction.UTTransaction.begin(UTTransaction.java:51)
                org.jboss.seam.transaction.DefaultSeamTransaction.begin(DefaultSeamTransaction.java:88)
                org.jboss.seam.transaction.TransactionServletListener.requestInitialized(TransactionServletListener.java:110)
                org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
                org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
                org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
                org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
                java.lang.Thread.run(Thread.java:722)
      
      

       

      Attached the server.log

       

       

      Anyone know what is the cause or the solution for this?

        • 1. Re: what causes Thread already associated with Transaction error Guvnor 5.5.0.Final ?
          ahmedza

          Hi Thomas,

           

          Did u find the root cause of this issue and the solution for this issue. There is a issue logged in Jboss JIRA for SEAM TRANSACTION, but there is no solution I can find for this issue.

           

          I have a web application which accesses Guvnor. We have processes and forms in Guvnor repository in a package. Guvnor is configured with JackRabbit and Oracle 11. Our web application accesses the process definitions and forms from guvnor. The issue gets fixed on restart of server. But, once this issue occurs, application can't access any asset or process definition from Guvnor using rest APIs. Even the Guvnor web-interface starts giving error. Only 4 users are using the application and getting this transaction association error.

           

          Following is the environment for the jboss instance where guvnor is configured.

          1. drools-guvnor-5.5.0-Final
          2. JBOSS ASS 7.1.0
          3. Oracle 11
          • 2. Re: what causes Thread already associated with Transaction error Guvnor 5.5.0.Final ?
            thomas.setiabudi

            hi community,

             

            any idea about this error?

             

            This error seems to happen at random time, but any fix for this?