在我们的应用程序中,我们使用下面的纯 java 代码创建队列,但有时这会导致以下错误。
我知道它失败的原因是 jar,但我已经放置了所有最新的 jar,但它仍然失败。现在我不知道该怎么办?
ActiveMQ 启动代码:
qconFactory = new ActiveMQConnectionFactory("My.Queue");
qcon = qconFactory.createConnection(); //error occurs here
session = qcon.createSession(false, Session.AUTO_ACKNOWLEDGE);
destination = session.createQueue(QUEUE_NAME);
producer = session.createProducer(destination);
consumer = session.createConsumer(destination);
msg = session.createTextMessage();
consumer.setMessageListener(new ImportMessageDrivenBean());
qcon.start();
错误
javax.jms.JMSException: Could not create Transport. Reason: java.lang.RuntimeException: Fatally failed to create SystemUsageInvalid version: 11, org.apache.activemq.openwire.v11.MarshallerFactory does not properly implement the createMarshallerMap method.
使用的 JAR
activemq-broker-5.15.4.jar
activemq-client-5.15.4.jar
activemq-jaas-5.15.4.jar
activemq-kahadb-store-5.15.4.jar
activemq-openwire-legacy-5.15.4.jar
activemq-protobuf-1.1.jar
geronimo-j2ee-management_1.1_spec-1.0.1.jar
geronimo-jms_1.1_spec-1.1.1.jar
geronimo-jta_1.0.1B_spec-1.0.1.jar
slf4j-api-1.7.25.jar