目前,我们正在从 WAS 迁移到 Tomcat 9,但遇到了 MQ 问题。我们正尝试通过客户端模式连接到 MQ。但不知何故,连接无法通过 MQ。在 tomcat/libs 中,我们有以下 MQ 客户端 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
以下是 context.xml 中为 MQ 连接定义的资源。
<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"/>
我们启用 mq jms 堆栈跟踪来检查确切原因,得到以下异常。
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>
知道如何解决上述错误吗?
添加完整错误跟踪
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]