In our application we are creating queues by using plain java code below, but sometimes this get failed cause of following error.
I have clue that it fails cause of jar but i have placed all latest jar but still it is failing . Now I have no idea what to do?
Activemq startup code:
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();
Error
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 used
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
You would get this error if one of the libraries you are using is built using a JDK version that is newer than the one you are running it on. Since that info is not in the question it is hard to guess for sure which one. I'd check that your JDK matches the required version of all the libraries you are using.
The 5.15.x version of ActiveMQ requires JDK 8 so my guess is you are trying to run it on JDK 7 or earlier