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时无法解决此问题。
是否有任何罐子可以解决转换问题?
我通过使用下面列出的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>