JMS Event Listener with RabbitMQ

I am trying to create a JMS Event Listener using RabbitMQ. But it fails to activate the Event Listener with the following messages:

Listener has been updated
error	Some library classes missing. Check whether the third party libraries are on the classpath.
No definition for the class with the specified name can be found: javax/jms/JMSException
 Class with the specified name cannot be found: javax.jms.JMSException
                       
java.lang.NoClassDefFoundError: javax/jms/JMSException
        at com.cloveretl.server.events.b.f.aC(Main:100)
        at com.cloveretl.server.events.b.f.init(Main:110)
        at com.cloveretl.server.events.listeners.livecycle.NodeDependentEventListenerLivecycleAware.a(Main:284)
        at com.cloveretl.server.events.listeners.livecycle.NodeDependentEventListenerLivecycleAware.a(Main:57)
        at com.cloveretl.server.events.listeners.livecycle.NodeDependentEventListenerLivecycleAware$1.call(Main:208)
        at com.cloveretl.server.events.listeners.livecycle.NodeDependentEventListenerLivecycleAware$1.call(Main:203)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: javax.jms.JMSException
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
        ... 10 more

                                                               
Close Detail
error	The listener failed to activate
No definition for the class with the specified name can be found: javax/jms/JMSException
 Class with the specified name cannot be found: javax.jms.JMSException
                       
java.lang.NoClassDefFoundError: javax/jms/JMSException
        at com.cloveretl.server.events.b.f.aC(Main:100)
        at com.cloveretl.server.events.b.f.destroy(Main:115)
        at com.cloveretl.server.events.listeners.livecycle.NodeDependentEventListenerLivecycleAware.a(Main:310)
        at com.cloveretl.server.events.listeners.livecycle.NodeDependentEventListenerLivecycleAware.a(Main:57)
        at com.cloveretl.server.events.listeners.livecycle.NodeDependentEventListenerLivecycleAware$1.call(Main:208)
        at com.cloveretl.server.events.listeners.livecycle.NodeDependentEventListenerLivecycleAware$1.call(Main:203)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: javax.jms.JMSException
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
        ... 10 more

We have installed the required plugin (https://www.rabbitmq.com/jms-client.html) so that RabbitMQ can support JMS Queue.
We also installed Java JMS Client for RabbitMQ (https://github.com/rabbitmq/rabbitmq-jms-client).

Could you please tell us what this error is about and how we should go about fixing this problem?

Hi sshrestha,

From the stack trace you included, it appears that the RabbitMQ Java client library is not specified in the application server that CloverETL Server is stored. If so, please download the rabbitmq.jar file and add it to the following path <TOMACAT_HOME>/lib folder and restart the server.

From the stack trace you included, it appears that the RabbitMQ Java client library is not specified in the application server that CloverETL Server is stored. If so, please download the rabbitmq.jar file and add it to the following path <TOMACAT_HOME>/lib folder and restart the server.

“vazquezrosariop”

Thank you Pedro.

We did go through this step. Maybe it was the wrong jar file. Do you think you could point us to the correct link for the jar file?

I have taken the liberty of attaching the example RabbitMQ graph, please look through it and let me know if you have any questions. Some notes about the graph:

  • RabbitMQ Reader and RabbitMQ Ack are both CustomJava components, and please look over the code in the trans folder.

  • Once the RabbitMQ Ack component is triggered the message will acknowledge, I would recommend adding writer to save the message you are pulling.

RabbitMQ.zip