11 Replies Latest reply on Dec 18, 2007 12:27 PM by marklittle

    IllegalStateException with Jboss-4.0.3

    subramaniam.venkat

      Hello All,

      When load is run on my application we sometime get the IllegalStateException.
      And those request's transaction timeouts. We have mentioned the transaction timeout as 300 seconds in the jbossjca-service.xml.
      But inside the application the transaction is not getting rollbacked and the entries made on the oracle database are being commited.
      We are using EJB's and use the transaction attributes of the EJB.
      The transaction attribute used is "Required".
      We are also using Arjuna Transaction manager.
      The stacktrace is attached below.
      Can someone is let me know what would be probelm.

      java.rmi.ServerException: RuntimeException; nested exception is:
       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 org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:386)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:196)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
       at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
       at org.jboss.ejb.Container.invoke(Container.java:873)
       at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
       at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
       at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
       at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
       at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
       at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
       at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
       at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
       at $Proxy152.deleteUser(Unknown Source)
      
      


        • 1. Re: IllegalStateException with Jboss-4.0.3
          marklittle

          It's hard to tell from the snippet, but the transaction associated with the thread is no longer active. This could mean that it was terminated using Transaction (which does not do thread-to-transaction disassociation), or that the transaction was rolled back due to a timeout, and in which case it is not disassociated from the original thread either. Look for warnings in the log that say something like "terminating transaction with X threads active!"

          • 2. Re: IllegalStateException with Jboss-4.0.3
            subramaniam.venkat

            Hello Mark,

            Thanks alot for your reply.

            So what this mean , is , this not something which my application is causing.
            This thread to transaction dissassociation is something which the transaction manger is taking care of.

            So what is the version of Arjuna Transaction i shoud upgrade to avoid this probelm or where this issue would be resolved.

            My Jboss version is Jboss-4.0.3Sp1.

            I have also read the Jira

            http://jira.jboss.com/jira/browse/JBAS-4481

            Is there some probelm like mentioned in the JIRA.

            Please let me know your comments as this has become a blocking issue in my application.

            Awaiting your reply,

            Thanks & Warm Regards,
            Subramaniam V.

            • 3. Re: IllegalStateException with Jboss-4.0.3
              subramaniam.venkat

              Hello Mark,

              Also please find the complete stack trace which i get.
              Please help me.

              Thanks & Warm Regards,
              Subramaniam V

              java.rmi.ServerException: RuntimeException; nested exception is:
               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 org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:386)
               at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:196)
               at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
               at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
               at org.jboss.ejb.Container.invoke(Container.java:873)
               at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
               at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
               at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
               at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
               at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
               at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
               at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
               at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
               at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
               at $Proxy152.deleteUser(Unknown Source)
               at com.UserManagementDelegate.deleteUser(UserManagementDelegate.java:227)
               at com.UserManagementEJB.deleteUser(Unknown Source)
               at sun.reflect.GeneratedMethodAccessor452.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
               at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
               at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
               at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
               at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
               at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
               at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
               at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:300)
               at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
               at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
               at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
               at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
               at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
               at org.jboss.ejb.Container.invoke(Container.java:873)
               at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
               at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
               at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
               at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
               at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
               at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
               at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
               at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
               at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
               at $Proxy150.deleteUser(Unknown Source)
               at sun.reflect.GeneratedMethodAccessor451.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:204)
               at org.jboss.axis.providers.java.RPCProvider.invokeTarget(RPCProvider.java:176)
               at org.jboss.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:121)
               at org.jboss.net.axis.server.EJBProvider.processMessage(EJBProvider.java:224)
               at org.jboss.axis.providers.java.JavaProvider.invoke(JavaProvider.java:358)
               at org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
               at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
               at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
               at org.jboss.axis.handlers.soap.SOAPService.invoke(SOAPService.java:560)
               at org.jboss.axis.server.AxisServer.invoke(AxisServer.java:355)
               at org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:911)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
               at org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
               at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
               at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
               at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
               at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
               at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
               at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
               at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
               at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
               at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
               at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
               at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
               at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
               at java.lang.Thread.run(Thread.java:534)
              Caused by: 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.commit(TransactionImple.java:194)
               at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:486)
               at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:346)
               at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
               at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
               at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
               ... 94 more
              
              


              • 4. Re: IllegalStateException with Jboss-4.0.3
                marklittle

                 

                "subramaniam.venkat" wrote:
                Hello Mark,

                Thanks alot for your reply.

                So what this mean , is , this not something which my application is causing.
                This thread to transaction dissassociation is something which the transaction manger is taking care of.

                So what is the version of Arjuna Transaction i shoud upgrade to avoid this probelm or where this issue would be resolved.


                You misunderstood me. I did not indicate *what* was causing the transaction to become inactive. Try attaching a debugger to the running process and monitor the transaction.


                My Jboss version is Jboss-4.0.3Sp1.

                I have also read the Jira

                http://jira.jboss.com/jira/browse/JBAS-4481

                Is there some probelm like mentioned in the JIRA.


                Without you providing more details about your problem, it's hard to tell.

                • 5. Re: IllegalStateException with Jboss-4.0.3
                  marklittle

                  Your stack trace does not show the warning message I indicated. If that is not present at all, then it may be that something else is going on. Attach a debugger.

                  • 6. Re: IllegalStateException with Jboss-4.0.3
                    subramaniam.venkat

                    Hello Mark,

                    To exaplin more i have exposed an SLSB as an web-service.
                    So there is a large number of request which are send to this SLSB and under load we get this error.


                    Your stack trace does not show the warning message I indicated. If that is not present at all, then it may be that something else is going on. Attach a debugger.


                    Please find my log4j.xml file.
                    <category name="org.apache.commons">
                     <priority value="INFO"/>
                     </category>
                     <!-- Limit JBoss categories to INFO>
                     <category name="org.jboss">
                     <priority value="INFO"/>
                     </category >
                     <category name="com.arjuna">
                     <priority value="DEBUG"/>
                     </category>
                    


                    But as this scernario occurs in load condition is it generating alot of log file.

                    can you please let me know if this is correct.
                    I am sorry if i am asking trival questions.
                    But please let me know your comments.

                    As i have found that there exception does not occur after timeout but after a running load it occurs.



                    Thanks & Warm Regards,
                    Subramaniam V

                    • 7. Re: IllegalStateException with Jboss-4.0.3
                      marklittle

                      You don't need to enable debugging on JBossTS to see the warning I mentioned. See http://wiki.jboss.org/wiki/Wiki.jsp?page=TxMultipleThreads.

                      • 8. Re: IllegalStateException with Jboss-4.0.3
                        subramaniam.venkat

                        Hello Mark,

                        I am not getting the warning message which you have mentioned.
                        To describe more i am exposing an SLSB as an web-service.
                        The transaction attribute for this SLSB is NotSupported.
                        Then the request is passed to another SLSB from where the transaction starts. The transaction attribute here is Required. We face this probelm only under load condition.

                        Please let me know what are the other things which i can look to find out the root cause of this probelm.

                        Awaiting your reply.

                        Thanks & Warm Regards,
                        Subramaniam V.

                        • 9. Re: IllegalStateException with Jboss-4.0.3
                          marklittle

                          In which case you need to attach a debugger (run your application within Eclipse, for instance, and debug it). If you really aren't getting those warnings then the creating thread is doing the termination and no disassociating the transaction. Since you are using JBoss 4.0.3SP1, it's possible that it is the application server (there were several bug fixes in this area between 4.0.3SP1 and 4.2). Can you update to JBossAS 4.2?

                          • 10. Re: IllegalStateException with Jboss-4.0.3
                            subramaniam.venkat

                            Hello Mark,

                            Thanks for your reply.
                            I cannot debug the application as it is running under load.
                            There would be more than 5 threads acessing the application.

                            The upgradation of the Jboss is not possible as we are nearly deployment.
                            Is there any other work around which we can implement
                            Do we have any patch for Arjuna Transaction which would solve this problem.

                            Please let me know your comments.

                            Awaiting your reply,
                            Thanks & Warm Regards,
                            Subramaniam V

                            • 11. Re: IllegalStateException with Jboss-4.0.3
                              marklittle

                              Sorry, we're good and willing to help, but even we can't produce a patch for something that we can't show as a bug or issue. This issue could be in your code, it could be in the AS, it could be in JBossTS. But so far there is nothing that would help isolate it.