0

Currently we are in process of migrating from WAS to Tomcat 9, but stuck with MQ issue. We are trying to connect to MQ through client mode. But somehow connection are not going through to MQ. In tomcat/libs, we have below files of MQ client 8.

Implementation-Title: WebSphere MQ classes for JMS and Java
Implementation-Version: 8.0.0.8 - p800-008-171121-DELTA-L180926.1
Implementation-Vendor: IBM Corporation

fscontext.jar
jms.jar  (2.0) version
JSON4J.jar
providerutil.jar
com.ibm.mq.allclient.jar

Below resource defined for MQ connection in context.xml.

<Resource name="jms/MQConnectionFactory" auth="Container" type="com.ibm.mq.jms.MQQueueConnectionFactory" factory="com.ibm.mq.jms.MQQueueConnectionFactoryFactory"
          HOST="hostname" PORT="port" CHAN="channel" TRAN="1" SCPHS="cipher" QMGR="Qmanager" />

  <Resource name="jms/rcsInQueueTREATS" auth="Container" type="com.ibm.mq.jms.MQQueue" factory="com.ibm.mq.jms.MQQueueFactory" SCPHS="cipher" QU="queue name"/>

We enable mq jms stack trace to check exact reason, we get below exception.

t)               ---  d  getInstance(String,int) Caught expected exception at catch index 8 [com.ibm.mq.jmqi.JmqiException: CC=2;RC=2495;AMQ8568: The native JNI library 'mqjbnd' was not found. [3=mqjbnd]] ----- **Not sure if any relevance here**

                ----+--  {  <init>(String,String,String,String,Map) [JMSFMQ6312: An exception occurred in the Java(tm) MQI.] [**JMSFMQ6312**] [The Java(tm) MQI has thrown an exception describing the problem. ] [See the linked exception for further information.] <null>

Any idea how to resolved above errors?

Adding full error trace

06:11:17.588.06  0001  @60e6c5a3  c.i.m.c.commonservices.cssystem.WASSupport$1
               ----+----+  d  <init> class [class com.ibm.mq.MQEnvironment]
06:11:17.588.07  0001  @60e6c5a3  c.i.m.c.commonservices.cssystem.WASSupport$1
               ----+----+  X  run()<catchIndex 2>
06:11:17.588.07  0001    com.ibm.mq.MQEnvironment.runningInWS() [java.lang.NoSuchMethodExc
eption] at:

06:11:17.588.0F  0001  @4b2371c6  java.lang.String(ComponentManager)
               ----+---  {  getComponent(String,HashMap) [LICENSE] [{WMQv7=}]
06:11:17.589.00  0001     static  c.i.m.client.commonservices.CSIException
               ----+----  d  static SCCS id [@(#) com.ibm.msg.client.commonservices/src/co
m/ibm/msg/client/commonservices/CSIException.java, jmscc.commonservices, k701, k701-101-09
1116  1.18.1.1 09/08/17 09:01:47]
06:11:17.592.00  0001  @44e0bbaa  c.i.m.client.commonservices.CSIException                               ----+----  {  <init>(String) [A component was unable to be located by the Component Manager. LICENSE]
06:11:17.592.01  0001  @44e0bbaa  c.i.m.client.commonservices.CSIException                               ----+----  }  <init>(String)
06:11:17.592.02  0001  @4b2371c6  java.lang.String(ComponentManager)                                     ----+----  !  getComponent(String,HashMap)<throwIndex 3>, A component was unable to be located by the Component Manager. LICENSE [com.ibm.msg.client.commonservices.CSIException]
06:11:17.592.03  0001  @113df8f9  c.i.m.c.wmq.factories.WMQFactoryFactory                                ----+---  d  <init>() Caught expected exception at catch index 2 [com.ibm.msg.client.commonservices.CSIException: A component was unable to be located by the Component Manager. LICENSE]
Gerald Schneider
  • 19,757
  • 8
  • 52
  • 79
  • Resources in context.xml – user17745726 Jul 05 '22 at 08:49
  • That error is not a real error if you are expecting to connect in client mode. Why are you using v8 which is out of support over 2 years. Go with 9.1, 9.2, or 9.3. What is the linked exception, can you edit your question and add the full error stack. – JoshMc Jul 08 '22 at 00:42
  • @JoshMc. I have added full error stack. – user17745726 Jul 12 '22 at 05:37
  • Your stack is showing that a MQ 7.1.0.9 jar is getting picked up. Check your class path and ensure you have no `com.ibm.mq*.jar` files left over. – JoshMc Jul 12 '22 at 12:57
  • I did check if we have 7.1.0.9 jar.Under tomcat/lib, we have following com.ibm.mq*, but those are 8.0.0.8. com.ibm.mq.allclient.jar com.ibm.mq.traceControl.jar We do have mq-jms under our application. Not sure if this might be causing issue. mq-jms_7.0-1.0.0.jar mq-jmqi_7.0-1.0.0.jar mq-dhbcore_6.0.1.1-1.0.0.jar – user17745726 Jul 13 '22 at 05:22
  • Both could be the problem. You should never mix ibm-mq jars from different versions. – JoshMc Jul 13 '22 at 09:58
  • Now, running into different issue after removing mq jar from our application. Only MQ 9.1 jar under lib directory. Caused by: java.lang.ClassNotFoundException: javax.jms.JMSRuntimeException at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_151] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_151] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_151] – user17745726 Jul 13 '22 at 17:51
  • You need the jms.jar that comes with 9.1 – JoshMc Jul 14 '22 at 01:15
  • It is resolved now. Getting cipher issue, will open different thread. Thanks – user17745726 Jul 14 '22 at 05:17

0 Answers0