5 Replies Latest reply on Dec 22, 2003 2:38 PM by Adrian Brock

    'Unable to commit' error with jboss-3.2.3RC1 after a while

    sfan Newbie

      I don't have this problem before until I start to use jboss-3.2.3RC1. It give me the 'Unable to commit' error after I start the server and come back next morning. I'm using MySQL

      Thanks

      Here is error track

      org.jboss.resource.connectionmanager.JBossLocalXAException: could not commit local tx; - nested throwable: (org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: Communication link failure: java.net.SocketException))
      at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:755)
      at org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1593)
      at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:375)
      at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:398)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:277)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:98)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
      at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:483)
      at org.jboss.ejb.Container.invoke(Container.java:720)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:293)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      at $Proxy43.findByLoginName(Unknown Source)
      at logon.LogonAction.getUserByLoginName(LogonAction.java:106)
      at logon.LogonAction.perform(LogonAction.java:44)
      at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1467)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1334)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:447)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: Communication link failure: java.net.SocketException)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException(BaseWrapperManagedConnection.java:546)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.commit(LocalManagedConnection.java:97)
      at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:748)
      ... 59 more
      Caused by: java.sql.SQLException: Communication link failure: java.net.SocketException
      at org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:459)
      at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java:550)
      at org.gjt.mm.mysql.MysqlIO.sqlQuery(MysqlIO.java:635)
      at org.gjt.mm.mysql.Connection.execSQL(Connection.java:882)
      at org.gjt.mm.mysql.Connection.execSQL(Connection.java:815)
      at org.gjt.mm.mysql.Connection.commit(Connection.java:523)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.commit(LocalManagedConnection.java:93)
      ... 60 more
      2003-12-12 10:01:20,459 WARN [org.jboss.tm.TransactionImpl] XAException: tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=1sfan//26615, BranchQual=] errorCode=XA_UNKNOWN(0)
      org.jboss.resource.connectionmanager.JBossLocalXAException: wrong xid in rollback: expected: null, got: XidImpl [FormatId=257, GlobalId=1sfan//26615, BranchQual=1]
      at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.rollback(TxConnectionManager.java:827)
      at org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1664)
      at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:403)
      at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:398)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:277)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:98)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
      at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:483)
      at org.jboss.ejb.Container.invoke(Container.java:720)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:293)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      at $Proxy43.findByLoginName(Unknown Source)
      at logon.LogonAction.getUserByLoginName(LogonAction.java:106)
      at logon.LogonAction.perform(LogonAction.java:44)
      at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1467)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1334)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:447)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
      at java.lang.Thread.run(Thread.java:534)
      2003-12-12 10:01:20,930 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.util.Collection com.genpt.rayloc.interfaces.UserLocalHome.findByLoginName(java.lang.String) throws javax.ejb.FinderException, causedBy:
      org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=1sfan//26615, BranchQual=] status=STATUS_NO_TRANSACTION; - nested throwable: (org.jboss.resource.connectionmanager.JBossLocalXAException: wrong xid in rollback: expected: null, got: XidImpl [FormatId=257, GlobalId=1sfan//26615, BranchQual=1])
      at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:413)
      at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:398)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:277)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:98)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
      at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:483)
      at org.jboss.ejb.Container.invoke(Container.java:720)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:293)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      at $Proxy43.findByLoginName(Unknown Source)
      at logon.LogonAction.getUserByLoginName(LogonAction.java:106)
      at logon.LogonAction.perform(LogonAction.java:44)
      at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1467)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1334)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:447)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)

        • 1. Re: 'Unable to commit' error with jboss-3.2.3RC1 after a whi
          Adrian Brock Master

          This message says your connection to the db was broken.

          Caused by: java.sql.SQLException: Communication link failure: java.net.SocketException
          at org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:459)
          at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java:550)
          at org.gjt.mm.mysql.MysqlIO.sqlQuery(MysqlIO.java:635)
          at org.gjt.mm.mysql.Connection.execSQL(Connection.java:882)
          at org.gjt.mm.mysql.Connection.execSQL(Connection.java:815)
          at org.gjt.mm.mysql.Connection.commit(Connection.java:523)

          Regards,
          Adrian

          • 2. Re: 'Unable to commit' error with jboss-3.2.3RC1 after a whi
            sfan Newbie

            Thanks
            Do you know why Jboss server drop the connection? It only happened when I leave for a quit while, say over hours. Is it a bug for jboss3.2.3RC1? I used jboss3.0.4-tomcat4.1.12 + oracle9 before and never had that problem.

            • 3. Re: 'Unable to commit' error with jboss-3.2.3RC1 after a whi
              Adrian Brock Master

              It isn't a bug in jboss.
              JBoss tells the jdbc driver when to open/close connections.
              If the driver, db or something else on the network breaks the connection
              it is their fault.
              You can add a
              <check-valid-connection-sql>
              to test for broken connections before they
              are handed out from the pool. But if the connection is broken part way through
              a transaction there is no transparent recovery (other than retrying after
              the transaction rollback).

              Regards,
              Adrian

              • 4. Re: 'Unable to commit' error with jboss-3.2.3RC1 after a whi
                sfan Newbie

                I just don't understand why it drop the connect and would not reconnect by itself since
                <idle-timeout-minutes>0</idle-timeout-minutes>

                And why can I rebuild the connection

                Thanks

                • 5. Re: 'Unable to commit' error with jboss-3.2.3RC1 after a whi
                  Adrian Brock Master

                  How many times must I repeat this?

                  It is your db, network or jdbc driver that is breaking the connection.

                  JBoss is not in play other than it has a connection that does not work any longer.
                  Something JBoss does not know about because there is no callback from
                  java.sql.Connection when a connection is broken.

                  Only when you try to use the connection does JBoss find out it no longer works.
                  Try using <check-valid-connection-sql> so the failure is more transparent to
                  your application.

                  Regards,
                  Adrian