3 Replies Latest reply on Jan 22, 2015 7:32 AM by Sivakumar KN

    Jboss does not commit the transaction when using Container Managed Transaction

    Sivakumar KN Newbie

      With large volumes of data, the MDB process those messages successfully but Jboss does not commit the messages on the queue and throwing the below error. Due to this, the messages are duplicated and the MDB keeps receiving them until the message is committed/dequeued. We are using Container Managed transaction.

       

      We are using Jboss eap 6.1, Websphere MQ 7.5 & its wmq.jmsra.rar

       

       

      01:29:01,091 WARN  [com.arjuna.ats.jta] (default-threads - 40) ARJUNA016039: onePhaseCommit on < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff1eb23c2c:a9efccd:548ea7f7:432d, node_name=1, branch_uid=0:ffff1eb23c2c:a9efccd:548ea7f7:432e, subordinatenodename=null, eis_name=unknown eis name > (com.ibm.mq.connector.xa.XARWrapper@5289ecae) failed with exception XAException.XAER_NOTA: javax.transaction.xa.XAException: The method 'xa_rollback' has failed with errorCode '-4'.

        at com.ibm.mq.jmqi.JmqiXAResource.rollback(JmqiXAResource.java:861)

        at com.ibm.mq.connector.xa.XARWrapper.rollback(XARWrapper.java:494)

        at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelOnePhaseCommit(XAResourceRecord.java:684)

        at com.arjuna.ats.arjuna.coordinator.BasicAction.onePhaseCommit(BasicAction.java:2263)

        at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1475)

        at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:98)

        at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)

        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)

        at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)

        at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)

        at org.jboss.as.ejb3.inflow.MessageEndpointInvocationHandler.afterDelivery(MessageEndpointInvocationHandler.java:72) [jboss-as-ejb3-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]

        at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source) [:1.7.0_67]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_67]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_67]

        at org.jboss.as.ejb3.inflow.AbstractInvocationHandler.handle(AbstractInvocationHandler.java:60) [jboss-as-ejb3-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]

        at org.jboss.as.ejb3.inflow.MessageEndpointInvocationHandler.doInvoke(MessageEndpointInvocationHandler.java:136) [jboss-as-ejb3-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]

        at org.jboss.as.ejb3.inflow.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:73) [jboss-as-ejb3-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]

        at com.sun.proxy.$Proxy67.afterDelivery(Unknown Source)

        at com.ibm.mq.connector.inbound.AbstractWorkImpl.run(AbstractWorkImpl.java:336)

        at org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:218)

        at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)

        at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:806)

        at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)

        at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:847)

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]

        at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      01:29:01,103 WARN  [com.arjuna.ats.arjuna] (default-threads - 40) ARJUNA012084: One-phase commit of action 0:ffff1eb23c2c:a9efccd:548ea7f7:432d received heuristic decision: TwoPhaseOutcome.HEURISTIC_HAZARD

      01:29:01,122 INFO  [stdout] (default-threads - 40) MQJCA4018:MessageEndpoint afterDelivery() call failed with: 'javax.transaction.HeuristicMixedException'.

        • 1. Re: Jboss does not commit the transaction when using Container Managed Transaction
          Jay SenSharma Master

          In general the error  [The method 'xa_rollback' has failed with errorCode '-4'] indicates that either the resource does not know about the tx or it might have forgotten about the transaction. 

           

          Similar issue is reported at http://www-01.ibm.com/support/docview.wss?uid=swg1IC85614    and mentioned that it's Fix available in:  7.5.0.3,   So can you check if you  are using that fix?

           

          If that's not the case then enabling the IBM MQ side  TRACE logging will help in understanding what's going wrong.    -Dcom.ibm.msg.client.commonservices.trace.status=ON

          http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.0.1/com.ibm.mq.csqzaw.doc/jm41100_.htm

          1 of 1 people found this helpful
          • 2. Re: Jboss does not commit the transaction when using Container Managed Transaction
            Sivakumar KN Newbie

            Thanks Jay. I will verify and let you know.

            1 of 1 people found this helpful
            • 3. Re: Jboss does not commit the transaction when using Container Managed Transaction
              Sivakumar KN Newbie

              Hi Jay,

               

              We are now using the Resource Adapter 7.5.0.3 as you said. But we are getting the following issue while issuing a rollback by calling MessageDrivenContext.setRollbackOnly() method. Any thoughts?

               

               

              04:29:55,085 INFO  [stdout] (default-threads - 42) MQJCA4026:Transaction backed out with reason: 'The method 'xa_end' has failed with errorCode '100'.'.

              04:29:55,091 WARN  [com.arjuna.ats.jta] (default-threads - 42) ARJUNA016045: attempted rollback of < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff1eb23c2c:3120f48b:54c0cfb3:cdc, node_name=1, branch_uid=0:ffff1eb23c2c:3120f48b:54c0cfb3:cdd, subordinatenodename=null, eis_name=unknown eis name > (com.ibm.mq.connector.xa.XARWrapper@167941c4) failed with exception code XAException.XAER_NOTA: javax.transaction.xa.XAException: The method 'xa_rollback' has failed with errorCode '-4'.

                at com.ibm.mq.jmqi.JmqiXAResource.rollback(JmqiXAResource.java:861)

                at com.ibm.mq.connector.xa.XARWrapper.rollback(XARWrapper.java:494)

                at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelAbort(XAResourceRecord.java:358)

                at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2853)

                at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2832)

                at com.arjuna.ats.arjuna.coordinator.BasicAction.Abort(BasicAction.java:1625)

                at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.cancel(TwoPhaseCoordinator.java:118)

                at com.arjuna.ats.arjuna.AtomicAction.abort(AtomicAction.java:186)

                at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.rollbackAndDisassociate(TransactionImple.java:1247)

                at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.rollback(BaseTransaction.java:143)

                at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.rollback(BaseTransactionManagerDelegate.java:114)

                at org.jboss.as.ejb3.inflow.MessageEndpointInvocationHandler.afterDelivery(MessageEndpointInvocationHandler.java:70) [jboss-as-ejb3-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]

                at sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source) [:1.7.0_67]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_67]

                at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_67]

                at org.jboss.as.ejb3.inflow.AbstractInvocationHandler.handle(AbstractInvocationHandler.java:60) [jboss-as-ejb3-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]

                at org.jboss.as.ejb3.inflow.MessageEndpointInvocationHandler.doInvoke(MessageEndpointInvocationHandler.java:136) [jboss-as-ejb3-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]

                at org.jboss.as.ejb3.inflow.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:73) [jboss-as-ejb3-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]

                at com.sun.proxy.$Proxy36.afterDelivery(Unknown Source)

                at com.ibm.mq.connector.inbound.AbstractWorkImpl.run(AbstractWorkImpl.java:336)

                at org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:218)

                at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)

                at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:806)

                at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)

                at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:847)

                at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]

                at org.jboss.threads.JBossThread.run(JBossThread.java:122)