创建 JMS 连接时出现 JmqiException

JmqiException while creating JMS connection

我正在开发 spring 引导 JMS 应用程序,它连接到 IBM MQ 以发送和接收 JMS 消息。我使用了以下 Maven 依赖项

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
    </dependency>

    <dependency>
        <groupId>com.ibm.mq</groupId>
        <artifactId>mq-jms-spring-boot-starter</artifactId>
        <version>0.0.3</version>
    </dependency>

我将 wmq.jmsra.rar 部署到 Payara 4 服务器,配置了所有队列连接工厂 JNDI 和队列管理对象。在此之后,当我部署应用程序的 war 文件时,出现错误

org.springframework.jms.UncategorizedJmsException: Uncategorized exception occurred during JMS processing; nested exception is com.ibm.msg.client.jms.DetailedJMSException: MQJCA1011: Failed to allocate a JMS connection.
An internal error caused an attempt to allocate a connection to fail.
See the linked exception for details of the failure.
at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)

根本原因是

Caused by: java.lang.NoSuchMethodException: com.ibm.mq.jmqi.remote.api.RemoteFAP.<init>(com.ibm.mq.jmqi.JmqiEnvironment, int)
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getConstructor(Class.java:1825)
at com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:702)
... 112 common frames omitted

我不确定问题出在哪里。我查看了很多在线论坛,但找不到任何解决方案,这似乎与某些 JAR 冲突有关,但我不确定。

我替换了 Maven 依赖项来解决问题。与导致问题的 mq-jms-spring-boot-starter 依赖项中的一个 jar 文件发生冲突

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jms</artifactId>
        <version>4.3.12.RELEASE</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>javax.jms</groupId>
        <artifactId>javax.jms-api</artifactId>
        <version>2.0.1</version>
        <scope>provided</scope>
    </dependency>