gpt4 book ai didi

java - IBM MQ Server 8.0.0.4 客户端库

转载 作者:行者123 更新时间:2023-11-30 07:21:42 27 4
gpt4 key购买 nike

我在使用 IBM MQ 8.0.0.4 时遇到了一个奇怪的问题。我的命令行应用程序(Java 8)从Windows环境连接到Linux服务器中安装的MQ服务器。应用程序在消息到达时从特定队列中读取消息。我使用以下 jar 作为客户端库 (8.0.0.4-WS-MQ-Install-Java-All.jar):-

com.ibm.mq.allclient.jar
com.ibm.mq.traceControl.jar
fscontext.jar
jms.jar
JSON4J.jar
providerutil.jar

应用程序照常运行,没有任何问题。可以通过“control+c”来停止。完成后,调用 ThreadGroup.interrupt() 并且应用程序按预期停止。不期望的是:-

1) 以下堆栈跟踪

[2016-05-26 14:13:14,023]-[DEBUG]-[       Thread-7]-[com.xyz.app.inf.DecoratorBase.invoke(){106}]-not overridden
[2016-05-26 14:13:14,316]-[ERROR]-[ Thread-7]-[com.xyz.app.inf.console.launcher.ServiceRunnerBase.serviceInternal(){230}]-Unhanled exception
com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ2002: Failed to get a message from destination 'QNAME'.
WebSphere MQ classes for JMS attempted to perform an MQGET; however WebSphere MQ reported an error.
Use the linked exception to determine the cause of this error.
at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:595)
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:215)
at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCallSuccess(WMQMessageConsumer.java:213)
at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCallSuccess(WMQMessageConsumer.java:261)
at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQConsumerShadow.java:1835)
at com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInternal(WMQSyncConsumerShadow.java:231)
at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive(WMQConsumerShadow.java:1471)
at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive(WMQMessageConsumer.java:659)
at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveInboundMessage(JmsMessageConsumerImpl.java:1036)
at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receive(JmsMessageConsumerImpl.java:671)
at com.ibm.mq.jms.MQMessageConsumer.receive(MQMessageConsumer.java:209)
at com.xyz.app.inf.XQueueReceiver.receive(XQueueReceiver.java:141)
at com.xyz.app.inf.XQueueReceiver.receive(XQueueReceiver.java:100)
at com.xyz.app.cli.services.impl.MessageRunner.read(MessageRunner.java:440)
at com.xyz.app.cli.services.impl.MessageRunner.task(MessageRunner.java:201)
at com.xyz.app.inf.console.launcher.ServiceRunnerBase.serviceInternal(ServiceRunnerBase.java:227)
at com.xyz.app.inf.console.launcher.ServiceRunnerBase.run(ServiceRunnerBase.java:127)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2195' ('MQRC_UNEXPECTED_ERROR').
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:203)
... 16 more
Caused by: com.ibm.mq.jmqi.local.LocalMQ$4: CC=2;RC=2495;AMQ8598: Failed to load the WebSphere MQ native JNI library: 'mqjbnd'.
at com.ibm.mq.jmqi.local.LocalMQ.loadLib(LocalMQ.java:1268)
at com.ibm.mq.jmqi.local.LocalMQ$1.run(LocalMQ.java:309)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.mq.jmqi.local.LocalMQ.initialise_inner(LocalMQ.java:259)
at com.ibm.mq.jmqi.local.LocalMQ.initialise(LocalMQ.java:221)
at com.ibm.mq.jmqi.local.LocalMQ.<init>(LocalMQ.java:1350)
at com.ibm.mq.jmqi.local.LocalServer.<init>(LocalServer.java:230)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:706)
at com.ibm.mq.jmqi.JmqiEnvironment.getMQI(JmqiEnvironment.java:640)
at com.ibm.msg.client.wmq.factories.WMQComponent.getImplementationInfo(WMQComponent.java:251)
at com.ibm.msg.client.commonservices.trace.Trace.getVersion(Trace.java:2092)
at com.ibm.msg.client.commonservices.trace.Trace.createFFSTString(Trace.java:2050)
at com.ibm.msg.client.commonservices.trace.Trace.ffstInternal(Trace.java:1935)
at com.ibm.msg.client.commonservices.trace.Trace.ffst(Trace.java:1736)
at com.ibm.mq.jmqi.remote.impl.RemoteProxyQueue.proxyMQGET(RemoteProxyQueue.java:2540)
at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetInternalWithRecon(RemoteFAP.java:7169)
at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetInternal(RemoteFAP.java:7054)
at com.ibm.mq.jmqi.internal.JmqiTools.getMessage(JmqiTools.java:1217)
at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGet(RemoteFAP.java:7001)
at com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.jmqiGet(InterceptedJmqiImpl.java:1325)
at com.ibm.mq.ese.jmqi.ESEJMQI.jmqiGet(ESEJMQI.java:600)
at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQConsumerShadow.java:1775)
... 13 more
Caused by: java.lang.UnsatisfiedLinkError: no mqjbnd in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at com.ibm.mq.jmqi.local.LocalMQ.loadLib(LocalMQ.java:1240)
... 38 more
[2016-05-26 14:13:14,326]-[INFO ]-[ Thread-5]-[com.xyz.app.startup.Application.destroy(){433}]-Application shutting down
[2016-05-26 14:13:14,326]-[INFO ]-[ Thread-5]-[com.xyz.app.startup.Application.cleanup(){608}]-Application.cleanup() called------

2) 创建名为 FFDC 的文件夹,其中包含名为 JMSCC0001.FDC、JMSCC0002.FDC 等的文件。

我之所以说堆栈跟踪是意外的,是因为它说“java.library.path 中没有 mqjbnd”,这意味着应用程序正在以绑定(bind)模式连接 MQ 服务器。但我正在客户端模式下连接,如您所见:

com.ibm.mq.jms.MQQueueConnectionFactory@c79b6829  :-  
| | XMSC_ADMIN_OBJECT_TYPE :- 17
| | XMSC_ASYNC_EXCEPTIONS :- 1
| | XMSC_CLIENT_ID :- <null>
| | XMSC_CONNECTION_TYPE :- 1
| | XMSC_CONNECTION_TYPE_NAME :- com.ibm.msg.client.wmq
| | XMSC_RTT_DIRECT_AUTH :- 0
| | XMSC_RTT_PROXY_HOSTNAME :- <null>
| | XMSC_RTT_PROXY_PORT :- 443
| | XMSC_WMQ_BROKER_CC_SUBQ :- SYSTEM.JMS.ND.CC.SUBSCRIBER.QUEUE
| | XMSC_WMQ_BROKER_CONTROLQ :- SYSTEM.BROKER.CONTROL.QUEUE
| | XMSC_WMQ_BROKER_PUBQ :- SYSTEM.BROKER.DEFAULT.STREAM
| | XMSC_WMQ_BROKER_QMGR :-
| | XMSC_WMQ_BROKER_SUBQ :- SYSTEM.JMS.ND.SUBSCRIBER.QUEUE
| | XMSC_WMQ_CCDTURL :- <null>
| | XMSC_WMQ_CF_DESCRIPTION :- <null>
| | XMSC_WMQ_CHANNEL :- NSICHL
| | XMSC_WMQ_CLEANUP_INTERVAL :- 3600000
| | XMSC_WMQ_CLEANUP_LEVEL :- 1
| | XMSC_WMQ_CLIENT_RECONNECT_OPTIONS :- 0
| | XMSC_WMQ_CLIENT_RECONNECT_TIMEOUT :- 1800
| | XMSC_WMQ_CLONE_SUPPORT :- 0
| | XMSC_WMQ_CONNECTION_MODE :- 1
| | XMSC_WMQ_CONNECTION_NAME_LIST_INT :-
| | | 0 :- 172.16.31.29(1414)
| | XMSC_WMQ_CONNECTION_TAG :- [B@161c410
| | XMSC_WMQ_CONNECT_OPTIONS :- 0
| | XMSC_WMQ_HEADER_COMP :-
| | | 0 :- 0
| | XMSC_WMQ_LOCAL_ADDRESS :-
| | XMSC_WMQ_MAP_NAME_STYLE :- true
| | XMSC_WMQ_MAX_BUFFER_SIZE :- 1000
| | XMSC_WMQ_MESSAGE_RETENTION :- 1
| | XMSC_WMQ_MESSAGE_SELECTION :- 0
| | XMSC_WMQ_MSG_BATCH_SIZE :- 10
| | XMSC_WMQ_MSG_COMP :-
| | | 0 :- 0
| | XMSC_WMQ_OPT_PUB :- false
| | XMSC_WMQ_OUTCOME_NOTIFICATION :- true
| | XMSC_WMQ_POLLING_INTERVAL :- 5000
| | XMSC_WMQ_PROCESS_DURATION :- 0
| | XMSC_WMQ_PROVIDER_VERSION :- unspecified
| | XMSC_WMQ_PUB_ACK_INTERVAL :- 25
| | XMSC_WMQ_QMGR_CCSID :- 819
| | XMSC_WMQ_QUEUE_MANAGER :- NSI
| | XMSC_WMQ_RECEIVE_EXIT :- <null>
| | XMSC_WMQ_RECEIVE_EXIT_INIT :- <null>
| | XMSC_WMQ_RECEIVE_ISOLATION :- 0
| | XMSC_WMQ_RESCAN_INTERVAL :- 5000
| | XMSC_WMQ_SECURITY_EXIT :- <null>
| | XMSC_WMQ_SECURITY_EXIT_INIT :- <null>
| | XMSC_WMQ_SEND_CHECK_COUNT :- 0
| | XMSC_WMQ_SEND_EXIT :- <null>
| | XMSC_WMQ_SEND_EXIT_INIT :- <null>
| | XMSC_WMQ_SHARE_CONV_ALLOWED :- 1
| | XMSC_WMQ_SPARSE_SUBSCRIPTIONS :- false
| | XMSC_WMQ_SSL_CERT_STORES_COL :- <null>
| | XMSC_WMQ_SSL_CERT_STORES_STR :- <null>
| | XMSC_WMQ_SSL_CIPHER_SUITE :- <null>
| | XMSC_WMQ_SSL_FIPS_REQUIRED :- false
| | XMSC_WMQ_SSL_KEY_RESETCOUNT :- 0
| | XMSC_WMQ_SSL_PEER_NAME :- <null>
| | XMSC_WMQ_SSL_SOCKET_FACTORY :- <null>
| | XMSC_WMQ_STATUS_REFRESH_INTERVAL :- 60000
| | XMSC_WMQ_SUBSCRIPTION_STORE :- 1
| | XMSC_WMQ_SYNCPOINT_ALL_GETS :- false
| | XMSC_WMQ_TARGET_CLIENT_MATCHING :- true
| | XMSC_WMQ_TEMPORARY_MODEL :- SYSTEM.DEFAULT.MODEL.QUEUE
| | XMSC_WMQ_TEMP_Q_PREFIX :-
| | XMSC_WMQ_TEMP_TOPIC_PREFIX :-
| | XMSC_WMQ_USE_CONNECTION_POOLING :- true
| | brokerVersion :- -1
| | failIfQuiesce :- 1
| | multicast :- 0
| | version :- 7
| | wildcardFormat :- 0

当我使用属于 Websphere MQ 7.0 的客户端库时,没有遇到上述堆栈跟踪。请帮忙。

最佳答案

事实上,您有 MQRC_UNEXPECTED_ERROR 和 FDC 文件,这意味着您确实应该为此向 IBM 打开一个 PMR。这是不应该发生的。

关于java - IBM MQ Server 8.0.0.4 客户端库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37462013/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com