After replacing JMS 1.1 dependency by JMS 2.0, an exception java.lang.NoSuchMethodError is thrown at runtime

Solution Verified - Updated -

Issue

  • When upgrading pom.xml dependencies for migration, the JMS version was changed from 1.1 to 2.0
  • When we tested, the route, we obtained the following exception:
java.lang.NoSuchMethodError: 'void javax.jms.Message.setJMSDeliveryTime(long)'
    at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1993)
    at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:329)
    at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:289)
    at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:224)
    at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:270)
...

Environment

  • JMS 1.1 libraries

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content