如何解决从 'com.ibm.mq.connector.outbound.ConnectionFactoryImpl' 到要求的 'javax.jms.ConnectionFactory' 的 ConversionNotSupportedException

How to solve ConversionNotSupportedException from 'com.ibm.mq.connector.outbound.ConnectionFactoryImpl' to required 'javax.jms.ConnectionFactory'

我正在尝试从 JBOSS EAP 6.4 迁移到 JBOSS EAP 7.2。

在服务器启动时我得到

BeanCreationException: Error creating bean with name 'A' defined in ServletContext resource Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.ibm.mq.connector.outbound.ConnectionFactoryImpl' to required type 'javax.jms.ConnectionFactory' for property 'queueManager'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.ibm.mq.connector.outbound.ConnectionFactoryImpl] to required type [javax.jms.ConnectionFactory] for property 'queueManager': no matching editors or conversion strategy found

为什么会出现这种情况,如何解决?

经过多次尝试,我通过将 javax.jms.api 添加到 standalone.xml 中的全局模块部分解决了这个错误。它通过 WMQ 设置解决了上述问题。

<global-modules>
    <module name="javax.jms.api"/>
</global-modules>