【问题标题】:Why do i get "Invalid version" with Spring and ActiveMQ为什么我使用 Spring 和 ActiveMQ 得到“无效版本”
【发布时间】:2016-12-26 16:58:03
【问题描述】:

我已经使用activeMQ 很长时间了。由于我在我的 tomcat 服务器中的 webapps 之间进行通信,我在 tomcat conf 中定义了一些队列,并且在 tomcat/lib 中拥有所有库,但我的应用程序使用 spring,更具体地说,使用 spring-jms 和 activemq-spring 库。

如果我将 activemq-all-5.11.1.jar 放入 lib,一切正常,但如果我只是放入单独的 jar(代理、客户端、控制台、kahadb、protobuf 和 spring), 我收到以下错误:

javax.jms.JMSException:无法创建传输。原因:java.io.IOException: Invalid version: 6, could not load org.apache.activemq.openwire.v6.MarshallerFactory 在 org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:36) ~[activemq-client-5.11.1.jar:5.11.1] 在 org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:319) ~[activemq-client-5.11.1.jar:5.11.1] 在 org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:332) ~[activemq-client-5.11.1.jar:5.11.1] 在 org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:305) ~[activemq-client-5.11.1.jar:5.11.1] 在 org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:245) ~[activemq-client-5.11.1.jar:5.11.1] 在 org.springframework.jms.connection.SingleConnectionFactory.doCreateConnection(SingleConnectionFactory.java:365) ~[spring-jms-4.1.6.RELEASE.jar:4.1.6.RELEASE]

我检查了“v6.MarshallerFactory”类,它似乎与与旧版本的经纪人交谈有关。但是我的代理在 tomcat 中运行,而我唯一的 active-mq-jars 是那些在 tomcat 库中的,所以我不明白为什么有人认为需要与旧版本的代理交谈。

非常感谢指针。

【问题讨论】:

    标签: spring tomcat activemq spring-jms


    【解决方案1】:

    您需要包含旧版 OpenWire 模块以支持与较旧的代理版本通信,如果您在项目中包含 this dependency,它应该可以工作。

    【讨论】:

      猜你喜欢
      • 2016-12-01
      • 2019-09-14
      • 1970-01-01
      • 2013-05-29
      • 1970-01-01
      • 2014-07-29
      • 1970-01-01
      • 2021-03-18
      • 2012-12-06
      相关资源
      最近更新 更多