0 Replies Latest reply on May 20, 2016 3:04 PM by Amit Srivastav

    MQJCA1011: Failed to allocate a JMS connection with JBOSS EAP 6.2.0.GA

    Amit Srivastav Newbie

      Hi All,
       
      I am trying to integrate JBOSS EAP6.2.0 with IBM MQ 7.5.
      JBOSS servers are configured to run in a managed domain.
       
      With JBoss 6.2, following steps are completed:
      1. successfully deployed wmq.jmsra.rar file
      2. Created resource adapter, connection factory and destination queue.
       
      here is the snippet of the configuration:
      <resource-adapter id="wmq.jmsra">
      <archive>
      wmq.jmsra.rar
      </archive>
      <transaction-support>NoTransaction</transaction-support>
      <connection-definition class-name="com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl" jndi-name="java:jboss/jms/ivt/IVTCF" enabled="true" use-java-context="true" pool-name="IVTCF">
      <config-property name="port">
      2414
      </config-property>
      <config-property name="hostName">
      localhost
      </config-property>
      <config-property name="channel">
      SYSTEM.DEF.SVRCONN
      </config-property>
      <config-property name="transportType">
      CLIENT
      </config-property>
      <config-property name="queueManager">
      MB7QMGR
      </config-property>
      <security>
      <application/>
      </security>
      <validation>
      <background-validation>false</background-validation>
      </validation>
      </connection-definition>
      </connection-definitions>
      <admin-objects>
      <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:jboss/jms/ivt/IVTQueue" enabled="true" use-java-context="false" pool-name="ivtQueue">
      <config-property name="baseQueueName">
      TESTQ
      </config-property>
      <config-property name="baseQueueManagerName">
      MB7QMGR
      </config-property>
      </admin-object>
      </admin-objects>
      </resource-adapter>
       
      With all configuration in place, I can see in the server logs that connection factory and destination is successfully bounded:
      JBAS010401: Bound JCA AdminObject [java:jboss/jms/ivt/IVTQueue] JBAS010401: Bound JCA ConnectionFactory [java:jboss/jms/ivt/IVTCF]
       
      I am able to get this connection factory in my java code but when I am trying to create connection from the factory I am getting below error:
      17:54:06,233 INFO [stdout] (http-/10.63.78.129:8010-1) Connection factory found !!
      17:54:06,233 INFO [stdout] (http-/10.63.78.129:8010-1) Destination queue found !!
      17:54:06,385 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.PoolByCri] (http-/10.63.78.129:8010-1) IJ000604: Throwable while attempting to get a new connection: null: 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:129)
      at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:105)
      at com.ibm.mq.connector.ConnectionBuilder.createConnection(ConnectionBuilder.java:197)
      at com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl.createConnection(ManagedConnectionFactoryImpl.java:434)
      at com.ibm.mq.connector.outbound.ManagedConnectionImpl.<init>(ManagedConnectionImpl.java:138)
      at com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:190)
      at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:781)
      at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:344)
      at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397)
      at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)
      at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)
      at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:302)
      at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)
      at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createManagedJMSConnection(ConnectionFactoryImpl.java:194)
      at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createConnectionInternal(ConnectionFactoryImpl.java:153)
      at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createConnection(ConnectionFactoryImpl.java:138)
      at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createConnection(ConnectionFactoryImpl.java:123)
      at com.tms.ice.apns.PutMessageToQueueUsingJNDI.putMessage(PutMessageToQueueUsingJNDI.java:31) [classes:]
      at com.tms.ice.apns.GenerateAPNSRequest.doPost(GenerateAPNSRequest.java:137) [classes:]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]
      at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
      at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2]
      at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2]
      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2]
      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2]
      at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2]
      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2]
      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2]
      at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2]
      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2]
      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.7.Final-redhat-2.jar:2.3.7.Final-redhat-2]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:91)
      at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:72)
      at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
      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 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_51]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_51]
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_51]
      at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_51]
      at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:319) [com.ibm.mq.jmqi.jar:7.5.0.0 - p000-L120604]
      at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:233) [com.ibm.mq.jmqi.jar:7.5.0.0 - p000-L120604]
      at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createV7ProviderConnection(WMQXAConnectionFactory.java:180) [com.ibm.mqjms.jar:7.5.0.0 - p000-L120604]
      at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:6254) [com.ibm.mqjms.jar:7.5.0.0 - p000-L120604]
      at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createProviderXAConnection(WMQXAConnectionFactory.java:107) [com.ibm.mqjms.jar:7.5.0.0 - p000-L120604]
      at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createXAConnectionInternal(JmsConnectionFactoryImpl.java:378) [com.ibm.mqjms.jar:7.5.0.0 - p000-L120604]
      at com.ibm.mq.jms.MQXAConnectionFactory.createXAConnection(MQXAConnectionFactory.java:129) [com.ibm.mqjms.jar:7.5.0.0 - p000-L120604]
      at com.ibm.mq.connector.ConnectionBuilder.createConnection(ConnectionBuilder.java:172)
      ... 46 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:822) [com.ibm.mq.jmqi.jar:7.5.0.0 - p000-L120604]
      at com.ibm.mq.jmqi.JmqiEnvironment.getMQI(JmqiEnvironment.java:666) [com.ibm.mq.jmqi.jar:7.5.0.0 - p000-L120604]
      at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createV7ProviderConnection(WMQXAConnectionFactory.java:172) [com.ibm.mqjms.jar:7.5.0.0 - p000-L120604]
      ... 51 more
      Caused by: java.lang.NoSuchMethodException: com.ibm.mq.jmqi.remote.api.RemoteFAP.<init>(com.ibm.mq.jmqi.JmqiEnvironment, int)
      at java.lang.Class.getConstructor0(Class.java:2810) [rt.jar:1.7.0_51]
      at java.lang.Class.getConstructor(Class.java:1718) [rt.jar:1.7.0_51]
      at com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:728) [com.ibm.mq.jmqi.jar:7.5.0.0 - p000-L120604]
      ... 53 more
       
      17:54:06,401 INFO [stdout] (http-/10.63.78.129:8010-1) GenerateAPNSRequest.Result for posting message in the queue MQJCA1011: Failed to allocate a JMS connection.

       
      I have searched multiple forums and were able to get to related topics but any solution if provided did not worked. Even updated the wmq.jmsra.rar version from 7.0.1.13 to 7.5.0.0 but still getting the same error.
       
      Request you all to have a look and suggest.