You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Robbie Gemmell (Jira)" <ji...@apache.org> on 2023/04/27 12:22:00 UTC

[jira] [Commented] (AMQ-9252) java.lang.NoSuchMethodError: 'void javax.jms.Message.setJMSDeliveryTime(long)'

    [ https://issues.apache.org/jira/browse/AMQ-9252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17717159#comment-17717159 ] 

Robbie Gemmell commented on AMQ-9252:
-------------------------------------

This almost certainly means the JMS 1.1 API is on the classpath and taking precedence, perhaps shifting position on the classpath between runs to explain the variation, and that the new partial-JMS-2.0 client isnt handling that while sending one of its own 2.0 messages, as it tried to call Message.setJMSDeliveryTime(long), which doesnt exist on the old Interface and so the JVM threw when the method wasnt found at runtime.

The application should really avoid getting into this situation. The client can also be tweaked so it handles it though.

> java.lang.NoSuchMethodError: 'void javax.jms.Message.setJMSDeliveryTime(long)'
> ------------------------------------------------------------------------------
>
>                 Key: AMQ-9252
>                 URL: https://issues.apache.org/jira/browse/AMQ-9252
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 5.18.0
>         Environment: ActiveMQ 5.18.0
> OpenJDK 11
>  
>            Reporter: Marc Boorshtein
>            Priority: Major
>
> Getting this exception starting in 5.18:
>  
> WARN  JMSConnection - Could not send keep alive for openunisuron-tasks-1, recreating
> java.lang.NoSuchMethodError: 'void javax.jms.Message.setJMSDeliveryTime(long)'
>         at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1993) ~[activemq-client-5.18.0.jar:5.18.0]
>         at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:329) ~[activemq-client-5.18.0.jar:5.18.0]
>         at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:289) ~[activemq-client-5.18.0.jar:5.18.0]
>         at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:224) ~[activemq-client-5.18.0.jar:5.18.0]
>         at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:270) ~[activemq-client-5.18.0.jar:5.18.0]
>         at com.tremolosecurity.provisioning.jms.JMSConnection$2.sendKeepAliveMessage(JMSConnection.java:158) [unison-sdk-1.0.34.jar:?]
>         at com.tremolosecurity.provisioning.jms.JMSConnection$2.run(JMSConnection.java:129) [unison-sdk-1.0.34.jar:?]
>         at java.lang.Thread.run(Thread.java:829) [?:?]
>  
> this seems to be introduced from [https://github.com/apache/activemq/commit/ead9533d5300fb2b5c48cfe70ef8b8fd84f46feb]
>  
> this error is not consistent, it comes up randomly.  Some runs, there are no issues but others this error happens.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)