无法将类型'com.ibm.mq.jms.MQQueueConnectionFactory'的属性值转换为所需的类型'javax.jms.ConnectionFactory'

问题描述 投票:2回答:1
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'XMqJmsTemplate' defined in class path resource [applicationContext-XMq.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.ibm.mq.jms.MQQueueConnectionFactory' to required type 'javax.jms.ConnectionFactory' for property 'connectionFactory'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.ibm.mq.jms.MQQueueConnectionFactory] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory': no matching editors or conversion strategy found.

我的pom.xml只有spring-jms3.2.14.RELEASE,因此没有冲突的机会。部署到Tomcat 8.0V时无法解决此问题。

是否有任何罐子可以解决转换问题?

spring jms mq jmstemplate dbconnectionfactory
1个回答
1
投票

我通过使用下面列出的Maven依赖关系解决了此问题:

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jms</artifactId>
            <version>SPRING-JMS-VERSION</version>
        </dependency>
        <dependency>
            <groupId>com.ibm.mq</groupId>
            <artifactId>com.ibm.mq.allclient</artifactId>
            <version>VERSION</version>
        </dependency>
© www.soinside.com 2019 - 2024. All rights reserved.