ibm-mqconnection-poolingpayara

Payara5 wmq.jmsra connection failure with MQJCA1011: Failed to allocate a JMS connection


I installed wmq.jmsra Resource adapter to Payara 5.2022.5 application server. I created a connector connection pool.

./asadmin create-connector-connection-pool --raname wmq.jmsra --connectiondefinition javax.jms.ConnectionFactory --transactionsupport XATransaction --property transportType=CLIENT:queueManager=QMANAGER:hostName=HOSTIP:port=PORT:channel=CHANNEL:username=USER:password=PASSWORD:applicationName=APPNAME wmq.jmsra-pool

./asadmin create-connector-resource --poolname wmq.jmsra-pool jms/JmsConnectionFactory

Everything was working, I was debugging the application via remote. Time to time, I redeploy my application which uses the connection pool. All of a sudden, Payara started to throw the following exception. It was interesting because 5 minutes before it worked.

I restart queue manager, removed pool definition, undeployed wmq.jmsra and configured it all over again. Nothing is changed. Restarted the domain.

It says it can't find the com.ibm.mq.jmqi.remote.api.RemoteFAP class however I can see it in the jmqi jar file of the wmq.jmsra application that is deployed.

Later I restarted everything, even my local computer, and worked but started to fail after a while.

Do anyone have similar issues?

[2023-06-07T12:46:33.739+0300] [Payara 5.2022.5] [SEVERE] [] [] [tid: _ThreadID=346 _ThreadName=Thread-39] [timeMillis: 1686131193739] [levelValue: 1000] [[
  com.ibm.msg.client.jms.DetailedJMSException: MQJCA1011: Failed to allocate a JMS connection.
An internal error caused an attempt to allocate a connection to fail.
See the linked exception for details of the failure.
    at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:184)
    at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:135)
    at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createManagedJMSConnection(ConnectionFactoryImpl.java:402)
    at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createConnectionInternal(ConnectionFactoryImpl.java:252)
    at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createConnection(ConnectionFactoryImpl.java:225)
    at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createConnection(ConnectionFactoryImpl.java:201)
    at com.heirloomcomputing.ecs.mqi.jms.module.StandardJMSModule.createConnection(StandardJMSModule.java:206)
    at com.heirloomcomputing.ecs.mqi.jms.module.StandardJMSModule.obtainConnection(StandardJMSModule.java:437)
    at com.heirloomcomputing.ecs.mqi.jms.JMSConnectionManager.mqConnect(JMSConnectionManager.java:61)
    at com.heirloomcomputing.ecs.mqi.MQIConnectionManagerAbstract.createConnection(MQIConnectionManagerAbstract.java:221)
    at com.heirloomcomputing.ecs.mqi.MQIConnectionManagerAbstract.mqConnect(MQIConnectionManagerAbstract.java:280)
    ......
    at com.heirloomcomputing.etp.transaction.services.IntervalControl$1.run(IntervalControl.java:390)
Caused by: com.sun.appserv.connectors.internal.api.PoolingException: MQJCA1011: Failed to allocate a JMS connection., error code: MQJCA1011
    at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:108)
    at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:288)
    at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1532)
    at com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:957)
    at com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:236)
    at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:527)
    at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:388)
    at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:244)
    at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:171)
    at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:354)
    at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:307)
    at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:196)
    at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:171)
    at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:166)
    at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createManagedJMSConnection(ConnectionFactoryImpl.java:309)
    ... 22 more
Caused by: com.sun.appserv.connectors.internal.api.PoolingException: MQJCA1011: Failed to allocate a JMS connection., error code: MQJCA1011
    at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:932)
    at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1209)
    at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:100)
    ... 36 more
Caused by: com.sun.appserv.connectors.internal.api.PoolingException: MQJCA1011: Failed to allocate a JMS connection., error code: MQJCA1011
    at com.sun.enterprise.resource.allocator.ConnectorAllocator.createResource(ConnectorAllocator.java:184)
    at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:919)
    ... 38 more
Caused by: com.ibm.mq.connector.DetailedResourceException: 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 com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:169)
    at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:135)
    at com.ibm.mq.connector.ConnectionBuilder.createConnection(ConnectionBuilder.java:162)
    at com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl.createConnection(ManagedConnectionFactoryImpl.java:655)
    at com.ibm.mq.connector.outbound.ManagedConnectionImpl.<init>(ManagedConnectionImpl.java:212)
    at com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:248)
    at com.sun.enterprise.resource.allocator.ConnectorAllocator.createResource(ConnectorAllocator.java:164)
    ... 39 more
Caused by: com.ibm.msg.client.jms.DetailedJMSException: JMSFMQ6312: An exception occurred in the Java(tm) MQI.
The Java(tm) MQI has thrown an exception describing the problem. 
See the linked exception for further information.
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
    at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:334)
    at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:226)
    at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createV7ProviderConnection(WMQXAConnectionFactory.java:172)
    at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:8023)
    at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createProviderXAConnection(WMQXAConnectionFactory.java:98)
    at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createXAConnectionInternal(JmsConnectionFactoryImpl.java:385)
    at com.ibm.mq.jms.MQXAConnectionFactory.createXAConnection(MQXAConnectionFactory.java:137)
    at com.ibm.mq.connector.ConnectionBuilder.createConnection(ConnectionBuilder.java:134)
    ... 43 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195;AMQ9546: Error return code received. [1=java.lang.NoSuchMethodException[com.ibm.mq.jmqi.remote.api.RemoteFAP.<init>(com.ibm.mq.jmqi.JmqiEnvironment,int)],3=Class.getConstructor0]
    at com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:855)
    at com.ibm.mq.jmqi.JmqiEnvironment.getMQI(JmqiEnvironment.java:699)
    at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createV7ProviderConnection(WMQXAConnectionFactory.java:164)
    ... 48 more
Caused by: java.lang.NoSuchMethodException: com.ibm.mq.jmqi.remote.api.RemoteFAP.<init>(com.ibm.mq.jmqi.JmqiEnvironment,int)
    at java.base/java.lang.Class.getConstructor0(Class.java:3585)
    at java.base/java.lang.Class.getConstructor(Class.java:2271)
    at com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:761)
    ... 50 more
]]

I am trying to create JMS connection pool with wmq.jmsra resource adapter at Payara 5.


Solution

  • This error occurs if MQ jar's are embedded into the application in addition to having installed them to the application server.