Question

3
Replies
749
Views
ParameshA5299 Member since 2016 1 post
HCL
Posted: April 27, 2017
Last activity: May 4, 2017
Closed

Issues with connecting to Websphere MQ from Pega using MDB listener

Hi ,

We are trying to connect to Websphere MQ from Pega through an MDB listener and facing the issues.

Stack Details:

Pega Version:7.2.1;

App Server:JBoss EAP 6.4.2.GA

Below are the details of a couple of approaches we tried.

Approach 1:

Configuring the Destination details in a separate xml file as described in the below pdn article:

https://pdn.pega.com/support-articles/jboss-512-websphere-mq-mdb-listener

The deployment of -ds.xml file is getting failed with parse exceptions caused by "conneciton-factories" tag.

Below are the errors:

org.jboss.msc.service.StartException in service jboss.deployment.unit."wmqueue-ds.xml".PARSE: JBAS018733: Failed to process phase PARSE of deployment "wmqueue-ds.xml"

at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server.jar:7.5.2.Final-redhat-2]

at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc.jar:1.1.5.Final-redhat-1]

at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc.jar:1.1.5.Final-redhat-1]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]

at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]

Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: IJ010061: Unexpected element: connection-factories

at org.jboss.as.connector.deployers.ds.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:99)

at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server.jar:7.5.2.Final-redhat-2]

... 5 more

Caused by: org.jboss.jca.common.metadata.ParserException: IJ010061: Unexpected element: connection-factories

at org.jboss.jca.common.metadata.ds.v10.DsParser.parse(DsParser.java:128)

at org.jboss.jca.common.metadata.ds.v10.DsParser.parse(DsParser.java:87)

at org.jboss.as.connector.deployers.ds.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:89)

... 6 more

Approach 2:

Create the connection pools and proxy objects destination objects by adding the appropriate tags in standalone.xml

  • Configured the connection pools with NoTransaction and XATransaction as mentioned in the below article

https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Administration_and_Configuration_Guide/Deploy_the_WebSphere_MQ_Resource_Adapter.html

  • Configured the jndi name of the MQProxy object in the MDBListener rule form.
  • Generate the MDB and updated prbeans jar with generated xml files
  • Updated the ear file with the updated prbeans.jar and redeployed.

Found the following errors in the server logs :

.StartException in service jboss.deployment.subunit."prpc_j2ee14_jboss61JBM.ear"."prbeans.jar".component.NPPMDBListener.START: java.lang.RuntimeException: com.ibm.mq.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 org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:57) [jboss-as-ee.jar:7.5.2.Final-redhat-2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_51]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_51]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.RuntimeException: com.ibm.mq.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 org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.activate(MessageDrivenComponent.java:206)
at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.start(MessageDrivenComponent.java:178)
at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54) [jboss-as-ee.jar:7.5.2.Final-redhat-2]
... 6 more
Caused by: com.ibm.mq.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 com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:134)
at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:105)
at com.ibm.mq.connector.inbound.ConnectionHandler.allocateConnection(ConnectionHandler.java:310)
at com.ibm.mq.connector.inbound.MessageEndpointDeployment.acquireConnection(MessageEndpointDeployment.java:281)
at com.ibm.mq.connector.inbound.MessageEndpointDeployment.<init>(MessageEndpointDeployment.java:233)
at com.ibm.mq.connector.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:393)
at org.jboss.jca.core.rar.EndpointImpl.activate(EndpointImpl.java:191)
at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.activate(MessageDrivenComponent.java:204)
... 8 more
Caused by: com.ibm.msg.client.jms.DetailedIllegalStateException: JMSWMQ0018: Failed to connect to queue manager '' with connection mode 'Client' and host name 'localhost(1414)'.
Check the queue manager is started and if running in client mode, check there is a listener running. Please see the linked exception for more information.
at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:479)
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:221)
at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:428)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:6892)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:6270)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:284)
at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6215)
at com.ibm.mq.jms.MQConnectionFactory.createConnection(MQConnectionFactory.java:6271)
at com.ibm.mq.connector.inbound.ConnectionHandler.allocateConnection(ConnectionHandler.java:215)
... 13 more
Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2538' ('MQRC_HOST_NOT_AVAILABLE').
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:209)
... 20 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2538;AMQ9204: Connection to host 'localhost(1414)' rejected. [1=com.ibm.mq.jmqi.JmqiException[CC=2;RC=2538;AMQ9213: A communications error for 'TCP' occurred. [1=java.net.ConnectException[Connection refused],3=connnectUsingLocalAddress,4=TCP,5=Socket.connect]],3=localhost(1414),5=RemoteTCPConnection.connnectUsingLocalAddress]
at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:2062)
at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1226)
at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:348)
... 19 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2538;AMQ9213: A communications error for 'TCP' occurred. [1=java.net.ConnectException[Connection refused],3=connnectUsingLocalAddress,4=TCP,5=Socket.connect]
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection.connnectUsingLocalAddress(RemoteTCPConnection.java:857)
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:1298)
at com.ibm.mq.jmqi.remote.impl.RemoteConnection.connect(RemoteConnection.java:724)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSessionFromNewConnection(RemoteConnectionSpecification.java:400)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSession(RemoteConnectionSpecification.java:299)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionPool.getSession(RemoteConnectionPool.java:164)
at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1599)
... 21 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method) [rt.jar:1.8.0_51]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) [rt.jar:1.8.0_51]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) [rt.jar:1.8.0_51]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) [rt.jar:1.8.0_51]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) [rt.jar:1.8.0_51]
at java.net.Socket.connect(Socket.java:589) [rt.jar:1.8.0_51]
at java.net.Socket.connect(Socket.java:538) [rt.jar:1.8.0_51]
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection$5.run(RemoteTCPConnection.java:842)
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection$5.run(RemoteTCPConnection.java:836)
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_51]
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection.connnectUsingLocalAddress(RemoteTCPConnection.java:834)
... 27 more

16:47:01,641 INFO [org.apache.struts2.config.AbstractBeanSelectionProvider] (ServerService Thread Pool -- 69) Choosing bean (struts) for (com

Could any one please guide the right approach in connecting from Pega to Websphere MQ through an MDB listener.

Regards

Paramesh

***Moderator Edit: Vidyaranjan | Updated Categories***

Data Integration
Moderation Team has archived post
Share this page LinkedIn