尝试从WebSphere 8运行Java 8 MQ应用程序时出现以下错误:
java.lang.IllegalStateException: Cannot convert value of type 'com.ibm.ejs.jms.JMSQueueConnectionFactoryHandle' to required type 'javax.jms.ConnectionFactory"
经过研究,我在这里看到一些建议,可以通过删除所有javax.jms
个jar来解决上述错误。我的war文件中有jms-api-2.0和geronimo-jms_1.1_spec罐子。我将它们都删除后,看到以下错误:
java.lang.NoClassDefFoundError: javax.jms.JMSRuntimeException
这将需要JMS jar。请告知。
我的战争中挤满了瓶子:
spring-boot-starter-web:jar:1.5.17.RELEASE
spring-boot-starter:jar:1.5.17.RELEASE
spring-boot-starter-log4j2:jar:1.5.17.RELEASE
spring-boot-starter-activemq:jar:1.5.17.RELEASE
commons-lang3:jar:3.5
cxf-rt-frontend-jaxws:jar:3.1.11
cxf-rt-transports-http:jar:3.1.11
cxf-rt-ws-security:jar:3.1.11
wss4j-ws-security-common:jar:2.2.1
groovy:jar:2.4.11
gson:jar:2.8.5
spring-boot-configuration-processor:jar:1.5.17.RELEASE
com.ibm.mq:jar:8.0.0.5
com.ibm.mq.headers:jar:8.0.0.5
com.ibm.mq.pcf:jar:8.0.0.5
com.ibm.mqjms:jar:8.0.0.5
com.ibm.mq.connector:jar:7.5.0.5
dhbcore:jar:7.5.0.5
mqcontext:jar:2.3
com.ibm.mq.commonservices:jar:8.0.0.5
jaxb-impl:jar:2.2.11
jaxb-core:jar:2.2.11
spring-oxm:jar:4.3.20.RELEASE
在删除所有com.ibm jars并添加com.ibm.mq.allclient和jms jars之后,我的war文件中的新jars列表:
spring-boot-starter-web:jar:1.5.17.RELEASE
spring-boot-starter:jar:1.5.17.RELEASE
spring-boot-starter-log4j2:jar:1.5.17.RELEASE
spring-boot-starter-activemq:jar:1.5.17.RELEASE
commons-lang3:jar:3.5
cxf-rt-frontend-jaxws:jar:3.1.11
cxf-rt-transports-http:jar:3.1.11
cxf-rt-ws-security:jar:3.1.11
wss4j-ws-security-common:jar:2.2.1
groovy:jar:2.4.11
gson:jar:2.8.5
spring-boot-configuration-processor:jar:1.5.17.RELEASE
jaxb-impl:jar:2.2.11
jaxb-core:jar:2.2.11
spring-oxm:jar:4.3.20.RELEASE
javax.jms-api:jar:2.0
com.ibm.mq.allclient:jar:9.1.1.0