在尝试从WebSphere 8运行Java8MQ应用程序时,遇到了以下错误:
java.lang.IllegalStateException: Cannot convert value of type 'com.ibm.ejs.jms.JMSQueueConnectionFactoryHandle' to required type 'javax.jms.ConnectionFactory"经过一些研究,我在这里看到了一些建议,即可以通过删除所有javax.jms jars来解决上述错误。我的war文件中有jms-api-2.0和geronimo-jms_1.1_spec war。我移除了这两个错误,之后我看到了以下错误:
java.lang.NoClassDefFoundError: javax.jms.JMSRuntimeException这将需要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之后,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发布于 2019-11-14 23:13:39
WAS8.5.5.x做不支持 JMS2.0:
WebSphere Application Server支持使用JMS1.1域独立接口(在JMS规范中称为“公共接口”)和JMS 1.0.2域特定接口的应用程序。
您应该使用内置于IBM的资源适配器,而不是使用WAR提供MQ库。
在WAS中配置队列连接工厂,并遵循WAS/Spring准则来引用此连接工厂。
发布于 2019-11-14 18:48:03
我认为您缺少IBM "jms.jar“文件。另外,为什么要使用IBM v8.0.0.5?已经过时了。
与其处理许多jms.jar文件,不如使用"com.ibm.mq.allclient“和"jms.jar”JAR文件。
使用和/或下载IBM v9.1.3.0,然后下载jms.jar
https://stackoverflow.com/questions/58863476
复制相似问题