Uploaded image for project: 'Seam 3 Distribution'
  1. Seam 3 Distribution
  2. SEAM-99

java.lang.IllegalStateException: BaseTransaction.checkTransactionState - thread is already associated with a transaction!

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: 3.0.0.Final
    • Fix Version/s: 3.1.0.CR1
    • Component/s: None
    • Labels:
      None
    • Environment:
      JBoss 7

      Description

      we sometimes get this exception - especially when clicking fast in the application.

      It won't go away until the server is restarted...!

      I'm not sure whether this bug is related to AS 7 or Seam...

      14:41:41,236 ERROR [com.meyle.deva.web.exceptions.DevaExceptionHandler] (http--127.0.0.1-8080-2) Bug-Id:1315917701236: Error occured handled by throwableHandler: java.lang.IllegalStateException: BaseTransaction.checkTransactionState - thread is already associated with a transaction!
      at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.checkTransactionState(BaseTransaction.java:259)
      at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:61)
      at org.jboss.seam.transaction.UTTransaction.begin(UTTransaction.java:56) [seam-persistence-3.0.0.Final.jar:]
      at org.jboss.seam.transaction.DefaultSeamTransaction.begin(DefaultSeamTransaction.java:102) [seam-persistence-3.0.0.Final.jar:]
      at org.jboss.seam.faces.transaction.TransactionPhaseListener.begin(TransactionPhaseListener.java:108) [seam-faces-3.0.2.Final.jar:]
      at org.jboss.seam.faces.transaction.TransactionPhaseListener.begin(TransactionPhaseListener.java:101) [seam-faces-3.0.2.Final.jar:]
      at org.jboss.seam.faces.transaction.TransactionPhaseListener.handleTransactionsBeforePhase(TransactionPhaseListener.java:82) [seam-faces-3.0.2.Final.jar:]
      at org.jboss.seam.faces.transaction.TransactionPhaseListener.beforePhase(TransactionPhaseListener.java:64) [seam-faces-3.0.2.Final.jar:]
      at org.jboss.seam.faces.event.DelegatingPhaseListener.beforePhase(DelegatingPhaseListener.java:43) [seam-faces-3.0.2.Final.jar:]
      at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228) [jsf-impl-2.0.6.jar:2.0.6-FCS]
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99) [jsf-impl-2.0.6.jar:2.0.6-FCS]
      at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:111) [jsf-impl-2.0.6.jar:2.0.6-FCS]
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.0.6.jar:2.0.6-FCS]
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
      at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
      at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:115) [prettyfaces-jsf2-3.2.0.jar:]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
      at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.1.Final.jar:7.0.1.Final]
      at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.1.Final.jar:7.0.1.Final]
      at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:49) [jboss-as-jpa-7.0.1.Final.jar:7.0.1.Final]
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
      at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]

        Gliffy Diagrams

          Activity

          Hide
          nickarls Nicklas Karlsson added a comment -

          Hmm, disregard last comment, different issue. I think I also had this but stuartdouglas recommended a rollback filter for me which I still have in place and solved the issue for me.

          Show
          nickarls Nicklas Karlsson added a comment - Hmm, disregard last comment, different issue. I think I also had this but stuartdouglas recommended a rollback filter for me which I still have in place and solved the issue for me.
          Hide
          shane.bryzak Shane Bryzak added a comment -

          I've added a RollbackFilter (thanks to Nik) that rolls back the transaction if it is still active

          Show
          shane.bryzak Shane Bryzak added a comment - I've added a RollbackFilter (thanks to Nik) that rolls back the transaction if it is still active
          Hide
          shane.bryzak Shane Bryzak added a comment -

          Jason is going to do some more work on this.

          Show
          shane.bryzak Shane Bryzak added a comment - Jason is going to do some more work on this.
          Hide
          fherrerot Francisco Herrero added a comment -

          Hello,
          I think a have found a reggresion bug. After fix in version 3.1.0.CR1, Ajax requests result in busy JDBC connections in my connection pool.
          I have to use version 3.1.0.Beta5, that works properly. The problem is caused by changes in TransactionPhaseListener.handleTransactionsAfterPhase() method.
          My applicacions a deployed en tomcat 6.

          Show
          fherrerot Francisco Herrero added a comment - Hello, I think a have found a reggresion bug. After fix in version 3.1.0.CR1, Ajax requests result in busy JDBC connections in my connection pool. I have to use version 3.1.0.Beta5, that works properly. The problem is caused by changes in TransactionPhaseListener.handleTransactionsAfterPhase() method. My applicacions a deployed en tomcat 6.
          Hide
          ahmedza Zahid Ahmed Prs added a comment - - edited

          Hi,

          The fix is not working in drools-5.5.0-Final. Its using seam 3.1.1-Final version but, the fix is not working for below environment.

          1. drools-guvnor-5.5.0-Final
          2. JBOSS ASS 7.1.0

          We have processes and forms in in Guvnor repository in a package. Our web application accesses the process definitions and forms from guvnor. This 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.

          Show
          ahmedza Zahid Ahmed Prs added a comment - - edited Hi, The fix is not working in drools-5.5.0-Final. Its using seam 3.1.1-Final version but, the fix is not working for below environment. 1. drools-guvnor-5.5.0-Final 2. JBOSS ASS 7.1.0 We have processes and forms in in Guvnor repository in a package. Our web application accesses the process definitions and forms from guvnor. This 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.

            People

            • Assignee:
              lightguard Jason Porter
              Reporter:
              dahm Markus Dahm
            • Votes:
              2 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development