Skip to content
Advertisement

Sending messages from Java to RabbitMQ using com.rabbitmq.http.client.Client

I’m trying to send messages from a Java service to RabbitMQ.

I’m using some Java RabbitMQ client library and trying to run the following code:

JavaScript

In the last line (Client objectinitialization), the following error is thrown:

java.lang.NoClassDefFoundError: org/springframework/http/converter/json/Jackson2ObjectMapperBuilder

I think I might be missing something in my pom.xml or maybe something with the version of Spring. However, I have not been able to find any missing import/library/version issues.

Please help 🙂

Advertisement

Answer

Add this jackson dependency in pom.xml:

JavaScript
Advertisement