3 Replies Latest reply on Aug 26, 2007 9:17 AM by christian.bauer

    Transactional issues

    pdhaigh

      Hi all,

      I'm seeing a sporadic transactional problem in my seam apps.

      2007-08-26 10:40:25,474 ERROR [org.jboss.aspects.tx.TxPolicy] IllegalStateException while setting transaction for rollback only
      java.lang.IllegalStateException: [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] The transaction is not active!
       at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.setRollbackOnly(TransactionImple.java:344)
       at org.jboss.aspects.tx.TxPolicy.setRollbackOnly(TxPolicy.java:212)
       at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:81)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
       at org.jboss.aspects.tx.TxInterceptor$Supports.invoke(TxInterceptor.java:148)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:204)
       at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:100)
       at $Proxy526.afterTransactionRollback(Unknown Source)
       at sun.reflect.GeneratedMethodAccessor13326.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
       at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
       at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
       at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
       at org.javassist.tmp.java.lang.Object_$$_javassist_0.afterTransactionRollback(Object_$$_javassist_0.java)
       at org.jboss.seam.transaction.UTTransaction.rollback(UTTransaction.java:70)
       at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:586)
       at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:325)


      This seems to happen pretty randomly, and is not reliably reproducable - but watching the logs for a while will show regular occurances. Does anyone have any pointers at configuration I might be needing?

      This is on Seam 2.0 from CVS and JBossAS 4.2.0.GA

        • 1. Re: Transactional issues
          christian.bauer

          This is typically just another exception that occurs because of an earlier exception. So look further up in your log.

          Seam/JSF does not always immediately exit the request processing when an exception occurs in a phase but continues processing other phases. One of the reasons why this happens is that we hope to handle the exception somehow later on with a redirect to an error page.

          I'd agree that this needs major improvements.

          • 2. Re: Transactional issues
            pdhaigh

            Hi Christian,

            Thanks for the reply.

            I've got instances where there is nothing erroneous in the log for up to 40 minutes prior to seeing this.. is that sort of timescale possible?

            • 3. Re: Transactional issues
              christian.bauer

              Well, Seam is doing a rollback:

              at org.jboss.seam.transaction.UTTransaction.rollback(UTTransaction.java:70)
              at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:586)

              So there must be a cause.