IBM MQ v7.5 with JBOSS EAP 6.4 with JCA resource adapter and MDB throws 'xa_open' has failed with errorCode '-3'

687 views Asked by At

I am using IBM MQ v7.5 with JBOSS EAP 6.4 with JCA resource adapter and MDB. MQ server is running in HP NonStop Integrity Server v5.3.1.12

The application is working correctly. But I am seeing the following exception in my log

[com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMFAIL: javax.transaction.xa.XAException
        at com.ibm.mq.connector.RecoveryXAResource.checkExceptions(RecoveryXAResource.java:147)
        at com.ibm.mq.connector.RecoveryXAResource.recover(RecoveryXAResource.java:514)
        at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.recover(XAResourceWrapperImpl.java:185)
        at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoveryFirstPass(XARecoveryModule.java:541) [jbossjts-jacorb-4.17.29.Final-redhat-1.jar:4.17.29.Final-redhat-1]
        at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkFirstPass(XARecoveryModule.java:181) [jbossjts-jacorb-4.17.29.Final-redhat-1.jar:4.17.29.Final-redhat-1]
        at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:747) [jbossjts-jacorb-4.17.29.Final-redhat-1.jar:4.17.29.Final-redhat-1]
        at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:375) [jbossjts-jacorb-4.17.29.Final-redhat-1.jar:4.17.29.Final-redhat-1] Caused by: com.ibm.msg.client.wmq.v6.jms.internal.ConfigEnvironment$1: MQJMS1068: failed to obtain XAResource.
        at com.ibm.msg.client.wmq.v6.jms.internal.ConfigEnvironment.newException(ConfigEnvironment.java:379)
        at com.ibm.msg.client.wmq.v6.jms.internal.MQXAConnection.createXASession(MQXAConnection.java:155)
        at com.ibm.msg.client.jms.internal.JmsXAConnectionImpl.createXASession(JmsXAConnectionImpl.java:125)
        at com.ibm.mq.jms.MQXAConnection.createXASession(MQXAConnection.java:88)
        at com.ibm.mq.connector.RecoveryXAResource.recover(RecoveryXAResource.java:490)
        ... 5 more Caused by: javax.transaction.xa.XAException: The method 'xa_open' has failed with errorCode '-3'.
        at com.ibm.mq.jmqi.JmqiXAResource.<init>(JmqiXAResource.java:274)
        at com.ibm.mq.jmqi.JmqiXAResource.getInstance(JmqiXAResource.java:122)
        at com.ibm.mq.jmqi.JmqiEnvironment.newJmqiXAResource(JmqiEnvironment.java:1598)
        at com.ibm.msg.client.wmq.v6.base.internal.MQXAQueueManager.getXAResource(MQXAQueueManager.java:175)
        at com.ibm.msg.client.wmq.v6.jms.internal.MQXAConnection.createXASession(MQXAConnection.java:134)
        ... 8 more

Can anyone help my understanding why this is happening?

Also, even if I stop my server, the connection to the MQ server was not killed. It remains as an orphan. Is it somehow related to this exception?

I am using NoTransaction in resource adapter configuration in standalone.xml

3

There are 3 answers

2
Doug Grove On

This is a known issue. IBM has issued fixpacks to address this issue. Please see:

http://www-01.ibm.com/support/docview.wss?uid=swg1IC97579

IBM MQ versions 7.5.0.4 and later have this fix.

And, yes, your orphaned connection is a result of this issue.

4
Tim McCormick On

The XA error code -3 is XAER_RMERR - which means that a problem occurred with the resource manager, in this case MQ.

Have you looked at the queue manager's error logs?

2
Anirban Chakraborty On

I missed an important point in this question (due to lack of knowledge in IBM MQ).That is, my MQ server is running in HP NonStop Integrity Server. These servers doesn't support XA connection. Hence this error.

Now, the question is how to stop it.

I have stopped the periodic recovery in JBOSS with the following properties:

name="RecoveryEnvironmentBean.periodicRecoveryPeriod" value="0" name="RecoveryEnvironmentBean.recoveryBackoffPeriod" value="0"