简体   繁体   中英

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

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

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?

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"

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM