【问题标题】:Jms app could not refesh connection with ibm mqJms 应用程序无法刷新与 ibm mq 的连接
【发布时间】:2018-10-18 18:05:46
【问题描述】:

我有 Ibm mq 服务器,我试图从我的应用程序连接到它。我的应用程序部署在 websphere 8.5.5 上,我使用 spring (JmsTemplate) 连接到 ibm mq 服务器 ibm 实现 (MQQueueConnectionFactory)。

当我在 tomcat 上部署它并尝试连接到远程 ibm mq 服务器时 - 没有问题。我可以从队列中打磨和接收信息,但是当我在 websphere 上部署应用程序时,我遇到了这个异常:

[1395,maxpri=10]] c.c.b.o.s.impl.StandardSequencer : [ - default - ] Server 1,001 has acquired/renewed the lock on sequencer 1,001. [sequencer:169] [Object=null, Object=null, Object=null, userid=null, uuid=null]

[10/12/18 10:15:59:977 UTC] 000062ea SystemOut O 2018-10-12 10:15:59.977 ERROR 774 --- [enerContainer-1] o.s.j.l.DefaultMessageListenerContainer : Could not refresh JMS Connection for destination 'QUeueTest' - retrying using FixedBackOff{interval=5000, currentAttempts=70, maxAttempts=unlimited}. Cause: JMSFMQ6312: An exception occurred in the Java(tm) MQI.; nested exception is com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195;AMQ9546: Error return code received. [1=java.lang.reflect.InvocationTargetException[null],3=GeneratedConstructorAccessor678.newInstance]

我认为有问题的部分是 lbires,但我知道如何解决它。 所以我想使用activemq实现作为客户端连接到ibm mq服务器。 有可能的 ? 感谢您的任何回答。

【问题讨论】:

  • 您不能使用 activemq 作为客户端连接到 IBM MQ。您应该下载 IBM MQ 资源适配器,google MQC8 用于 MQ v8.0,MQC9 用于 MQ v9.0,或MQC91 用于 MQ v9.1。单击链接访问 Fixcentral 后,获取名称类似于 v9.1 的 9.1.0.0-IBM-MQ-Java-InstallRA 的文件
  • 1.请发布完整的堆栈跟踪。 3. 你使用的是 BINDINGS 还是 CLIENT 模式? 3.您是否按照ibm.com/support/knowledgecenter/en/SSFKSJ_9.1.0/…的指示进行操作?

标签: java jms ibm-mq websphere-8


【解决方案1】:

我解决了这个问题。

应用程序部署在 websphere 服务器上。我将它与所有 jar 一起部署,但没有提供范围。这是错误的。当应用程序在服务器上时,只需要 wmq.jmsra jars。

        <groupId>com.ibm.mq</groupId>

        <artifactId>com.ibm.mq.allclient</artifactId>

        <version>9.0.4.0</version>

        <scope>provided</scope>

    </dependency>



    <!-- https://mvnrepository.com/artifact/com.ibm.mq/wmq.jmsra -->

    <dependency>

        <groupId>com.ibm.mq</groupId>

        <artifactId>wmq.jmsra</artifactId>

        <version>9.0.4.0</version>

        <type>rar</type>

        <scope>compile</scope>

    </dependency>

感谢您的帮助。

【讨论】:

  • WAS 附带了 IBM MQ 资源适配器,应该不需要与您的应用程序一起部署任何 IBM MQ jar。
猜你喜欢
  • 2022-08-19
  • 2023-03-05
  • 2020-06-16
  • 1970-01-01
  • 1970-01-01
  • 2019-12-31
  • 2015-07-08
  • 1970-01-01
  • 2018-10-13
相关资源
最近更新 更多