-
Bug
-
Resolution: Done
-
Major
-
None
-
8.0.0.GA-CR1
-
None
-
False
-
None
-
False
-
-
-
-
-
-
Workaround Exists
-
-
-
IBM MQ 9 resource adapter has configuration file called META-INF/ra.xml inside wmq.jakarta.jmsra.rar.
This ra.xml in the rar must be edited manually to provide information about remote IBM MQ 9 broker like:
... <inbound-resourceadapter> <messageadapter> <messagelistener> <messagelistener-type>jakarta.jms.MessageListener</messagelistener-type> <activationspec> <activationspec-class>com.ibm.mq.jakarta.connector.inbound.ActivationSpecImpl</activationspec-class> <required-config-property> <config-property-name>destination</config-property-name> </required-config-property> <required-config-property> <config-property-name>destinationType</config-property-name> </required-config-property> <config-property> <config-property-name>queueManager</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>QM</config-property-value> </config-property> <config-property> <config-property-name>clientID</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>inboundConnectionClientId</config-property-value> </config-property> <config-property> <config-property-name>channel</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>CH</config-property-value> </config-property> <config-property> <config-property-name>hostName</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>10.19.64.129</config-property-value> </config-property> <config-property> <config-property-name>transportType</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>CLIENT</config-property-value> </config-property> </activationspec> </messagelistener> </messageadapter> </inbound-resourceadapter> ...
This is necesary for MDB to work as it's using this inbound connection.
Problematic part is clientID property which must be set either in activation-config-property in MDB or in ra.xml (as in example above) when creating durable subscription on topic. IBM MQ resource adapter requires it to be defined in this case and cannot be null.
In case that deployment contains multiple MDBs or there are more deployments with MDBs which do NOT set it's clientID and use clientID from ra.xml then following exception is thrown:
13:19:02,531 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 84) MSC000001: Failed to start service jboss.deployment.subunit."mdb_exceptT.ear"."mdb_exceptT_ejb.jar".component.MDB_DURABLETXNS_CMT.START: org.jboss.msc.service.StartException in service jboss.deployment.subunit."mdb_exceptT.ear"."mdb_exceptT_ejb.jar".component.MDB_DURABLETXNS_CMT.START: java.lang.RuntimeException: WFLYEJB0501: Failed to activate MDB MDB_DURABLETXNS_CMT at org.jboss.as.ee@30.0.0.Beta1-SNAPSHOT//org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:57) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990) at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348) at java.base/java.lang.Thread.run(Thread.java:834) at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513) Caused by: java.lang.RuntimeException: WFLYEJB0501: Failed to activate MDB MDB_DURABLETXNS_CMT at org.jboss.as.ejb3@30.0.0.Beta1-SNAPSHOT//org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.activate(MessageDrivenComponent.java:281) at org.jboss.as.ejb3@30.0.0.Beta1-SNAPSHOT//org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.start(MessageDrivenComponent.java:233) at org.jboss.as.ee@30.0.0.Beta1-SNAPSHOT//org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54) ... 8 more Caused by: com.ibm.mq.jakarta.connector.DetailedResourceAdapterInternalException: MQJCA1011: Failed to allocate a JMS connection., error code: MQJCA1011 An internal error caused an attempt to allocate a connection to fail. See the linked exception for details of the failure. at deployment.wmq.jakarta.jmsra.rar//com.ibm.mq.jakarta.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:174) at deployment.wmq.jakarta.jmsra.rar//com.ibm.mq.jakarta.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:135) at deployment.wmq.jakarta.jmsra.rar//com.ibm.mq.jakarta.connector.inbound.ConnectionHandler.allocateConnection(ConnectionHandler.java:461) at deployment.wmq.jakarta.jmsra.rar//com.ibm.mq.jakarta.connector.inbound.MessageEndpointDeployment.acquireConnection(MessageEndpointDeployment.java:399) at deployment.wmq.jakarta.jmsra.rar//com.ibm.mq.jakarta.connector.inbound.MessageEndpointDeployment.<init>(MessageEndpointDeployment.java:338) at deployment.wmq.jakarta.jmsra.rar//com.ibm.mq.jakarta.connector.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:562) at org.jboss.ironjacamar.impl@3.0.4.Final//org.jboss.jca.core.rar.EndpointImpl.activate(EndpointImpl.java:208) at org.jboss.as.ejb3@30.0.0.Beta1-SNAPSHOT//org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.activate(MessageDrivenComponent.java:276) ... 10 more Caused by: com.ibm.msg.client.jakarta.jms.DetailedInvalidClientIDException: JMSCC0111: IBM MQ classes for JMS attempted to set a pre-existing client ID on a Connection or JMSContext. An application attempted to set the client ID property of a valid Connection or JMSContext to the value 'inboundClientId' but this value was already in use. The clientId had already been set by Thread[ServerService Thread Pool -- 80,5,ServerService ThreadGroup] Wed Aug 30 13:19:00 CEST 2023 : java.base/java.lang.Thread.getStackTrace(Thread.java:1606) : deployment.wmq.jakarta.jmsra.rar//com.ibm.msg.client.jakarta.jms.internal.JmsConnectionImpl$ClientIDSetter.<init>(JmsConnectionImpl.java:123) : deployment.wmq.jakarta.jmsra.rar//com.ibm.msg.client.jakarta.jms.internal.JmsConnectionImpl.checkDuplicateClientID(JmsConnectionImpl.java:340) : deployment.wmq.jakarta.jmsra.rar//com.ibm.msg.client.jakarta.jms.internal.JmsConnectionImpl.<init>(JmsConnectionImpl.java:273) : deployment.wmq.jakarta.jmsra.rar//com.ibm.msg.client.jakarta.jms.admin.JmsConnectionFactoryImpl._createConnection(JmsConnectionFactoryImpl.java:305) : deployment.wmq.jakarta.jmsra.rar//com.ibm.msg.client.jakarta.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:242) : deployment.wmq.jakarta.jmsra.rar//com.ibm.mq.jakarta.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6026) : deployment.wmq.jakarta.jmsra.rar//com.ibm.mq.jakarta.jms.MQConnectionFactory.createConnection(MQConnectionFactory.java:6055) : deployment.wmq.jakarta.jmsra.rar//com.ibm.mq.jakarta.connector.inbound.ConnectionHandler.allocateConnection(ConnectionHandler.java:300) : deployment.wmq.jakarta.jmsra.rar//com.ibm.mq.jakarta.connector.inbound.MessageEndpointDeployment.acquireConnection(MessageEndpointDeployment.java:399) : deployment.wmq.jakarta.jmsra.rar//com.ibm.mq.jakarta.connector.inbound.MessageEndpointDeployment.<init>(MessageEndpointDeployment.java:338) : deployment.wmq.jakarta.jmsra.rar//com.ibm.mq.jakarta.connector.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:562) : org.jboss.ironjacamar.impl@3.0.4.Final//org.jboss.jca.core.rar.EndpointImpl.activate(EndpointImpl.java:208) : org.jboss.as.ejb3@30.0.0.Beta1-SNAPSHOT//org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.activate(MessageDrivenComponent.java:276) : org.jboss.as.ejb3@30.0.0.Beta1-SNAPSHOT//org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.start(MessageDrivenComponent.java:233) : org.jboss.as.ee@30.0.0.Beta1-SNAPSHOT//org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54) : java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) : java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) : org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) : org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990) : org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) : org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377) : java.base/java.lang.Thread.run(Thread.java:834) : org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513) . Ensure that the connection is valid and that the client ID is unique. at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at deployment.wmq.jakarta.jmsra.rar//com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:334) at deployment.wmq.jakarta.jmsra.rar//com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:226) at deployment.wmq.jakarta.jmsra.rar//com.ibm.msg.client.jakarta.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:126) at deployment.wmq.jakarta.jmsra.rar//com.ibm.msg.client.jakarta.jms.internal.JmsConnectionImpl.checkDuplicateClientID(JmsConnectionImpl.java:331) at deployment.wmq.jakarta.jmsra.rar//com.ibm.msg.client.jakarta.jms.internal.JmsConnectionImpl.<init>(JmsConnectionImpl.java:273) at deployment.wmq.jakarta.jmsra.rar//com.ibm.msg.client.jakarta.jms.admin.JmsConnectionFactoryImpl._createConnection(JmsConnectionFactoryImpl.java:305) at deployment.wmq.jakarta.jmsra.rar//com.ibm.msg.client.jakarta.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:242) at deployment.wmq.jakarta.jmsra.rar//com.ibm.mq.jakarta.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6026) at deployment.wmq.jakarta.jmsra.rar//com.ibm.mq.jakarta.jms.MQConnectionFactory.createConnection(MQConnectionFactory.java:6055) at deployment.wmq.jakarta.jmsra.rar//com.ibm.mq.jakarta.connector.inbound.ConnectionHandler.allocateConnection(ConnectionHandler.java:300)
This should be documented with workaround to provide resolution to users. Related info can be found in https://www.ibm.com/docs/en/ibm-mq/9.2?topic=functionality-supportmqextensions-property#q119130_