Salesforce

The Generic JMS Adapter does not work with the QPID JMS Provider

« Go Back

Information

 
TitleThe Generic JMS Adapter does not work with the QPID JMS Provider
URL NameGeneric-JMS-Adapter-does-not-work-with-the-Qpid-JMS-client-libraries
Article Number000234206
EnvironmentProduct: OpenEdge
Version: 12.x
OS: All supported platforms
Other: Generic JMS Adapter
Question/Problem Description
The connection to a JMS broker that uses the AMQP protocol will fail with the following exception in the Generic JMS Adapter server log file when using the Qpid JMS provider:
java.lang.Exception: org.apache.qpid.jms.JmsConnectionFactory class file not mentioned correctly: java.lang.NoSuchMethodException: org.apache.qpid.jms.JmsConnectionFactory.setBrokerURL(java.lang.String)
at com.progress.messaging.jms.jms.createConnectionFactory(jms.java:125)
at com.progress.messaging.jms.jms._connect(jms.java:309)
at com.progress.javafrom4gl.implementation.JavaServlet.(JavaServlet.java:81)
at com.progress.javafrom4gl.implementation.ServiceImpl.createConnectionServlet(ServiceImpl.java:106)
at com.progress.ubroker.broker.ubServerThreadIPC.write(ubServerThreadIPC.java:433)
at com.progress.ubroker.broker.ubASserverThread.processConnect(ubASserverThread.java:574)
at com.progress.ubroker.broker.ubServerThread.processEvent(ubServerThread.java:1210)
at com.progress.ubroker.broker.ubServerThread.mainline(ubServerThread.java:479)
at com.progress.ubroker.broker.ubServerThread.run(ubServerThread.java:356)


 
Steps to Reproduce
Clarifying Information
The following JMS Provider is defined in the %DLC%\properties\jmsProvider.properties file:
[Qpid]
javax.jms.ConnectionFactory=org.apache.qpid.jms.JmsConnectionFactory
javax.jms.QueueConnectionFactory=org.apache.qpid.jms.JmsConnectionFactory
javax.jms.TopicConnectionFactory=org.apache.qpid.jms.JmsConnectionFactory

All the required Qpid client libraries have been defined in the JavaTools.properties file. For example:
[SonicMQ]
classpath=C:\apache-qpid-jms-1.8.0\lib\qpid-jms-client-1.8.0.jar,C:\apache-qpid-jms-1.8.0\lib\slf4j-api-1.7.36.jar,C:\apache-qpid-jms-1.8.0\lib\jakarta.jms-api-2.0.3.jar,C:\apache-qpid-jms-1.8.0\lib\proton-j-0.34.0.jar,C:\apache-qpid-jms-1.8.0\lib\netty-buffer-4.1.86.Final.jar,C:\apache-qpid-jms-1.8.0\lib\netty-common-4.1.86.Final.jar,C:\apache-qpid-jms-1.8.0\lib\netty-handler-4.1.86.Final.jar,C:\apache-qpid-jms-1.8.0\lib\netty-resolver-4.1.86.Final.jar,C:\apache-qpid-jms-1.8.0\lib\netty-transport-native-unix-common-4.1.86.Final.jar,C:\apache-qpid-jms-1.8.0\lib\netty-codec-4.1.86.Final.jar,C:\apache-qpid-jms-1.8.0\lib\netty-transport-4.1.86.Final.jar,C:\apache-qpid-jms-1.8.0\lib\netty-transport-native-epoll-4.1.86.Final-linux-x86_64.jar,C:\apache-qpid-jms-1.8.0\lib\netty-transport-classes-epoll-4.1.86.Final.jar,C:\apache-qpid-jms-1.8.0\lib\netty-transport-native-kqueue-4.1.86.Final-osx-x86_64.jar,C:\apache-qpid-jms-1.8.0\lib\netty-transport-classes-kqueue-4.1.86.Final.jar,C:\apache-qpid-jms-1.8.0\lib\netty-codec-http-4.1.86.Final.jar,C:\apache-qpid-jms-1.8.0\lib\qpid-jms-discovery-1.8.0.jar,${DLC}/java/progress.jar
jvmargs=-DsonicMQExtensions=false -DjmsProvider=Qpid




 
Error Messagejava.lang.Exception: org.apache.qpid.jms.JmsConnectionFactory class file not mentioned correctly: java.lang.NoSuchMethodException: org.apache.qpid.jms.JmsConnectionFactory.setBrokerURL(java.lang.String)
at com.progress.messaging.jms.jms.createConnectionFactory(jms.java:125)
at com.progress.messaging.jms.jms._connect(jms.java:309)
at com.progress.javafrom4gl.implementation.JavaServlet.(JavaServlet.java:81)
at com.progress.javafrom4gl.implementation.ServiceImpl.createConnectionServlet(ServiceImpl.java:106)
at com.progress.ubroker.broker.ubServerThreadIPC.write(ubServerThreadIPC.java:433)
at com.progress.ubroker.broker.ubASserverThread.processConnect(ubASserverThread.java:574)
at com.progress.ubroker.broker.ubServerThread.processEvent(ubServerThread.java:1210)
at com.progress.ubroker.broker.ubServerThread.mainline(ubServerThread.java:479)
at com.progress.ubroker.broker.ubServerThread.run(ubServerThread.java:356)
Defect NumberOCTA-54555
Enhancement Number
Cause
The Qpid JMS client libraries make use of the Java setRemoteURI method instead of the setBrokerUrl method to specify the broker URL. However, the Generic JMS Adapter is calling the Java setBrokerUrl method.
Resolution
Until the fix is available, use the workaround below.
 
Workaround
Make use of JNDI and JMS Administered Objects to make a connection via the Qpid JMS client library. The steps are outlined in the following KB article:

Sample code and setup for using Apache QPID JMS client with OpenEdge Generic JMS adapter
Notes
Keyword Phrase
Last Modified Date5/25/2023 11:18 PM

Powered by