While communicating with RabbitMQ messages are consumed successfully, however, the following warning is displayed in the logs.
**error occurred while mapping from AMQP properties to MessageHeaders**
lang.IllegalStateException: java.lang.ClassNotFoundException: Class_Name
t org.springframework.integration.mapping.support.JsonHeaders.getClassForValue(JsonHeaders.java:89) ~[spring-integration-core-5.2.4.RELEASE.jar:5.2.4.RELEASE]
at org.springframework.integration.mapping.support.JsonHeaders.buildResolvableType(JsonHeaders.java:72) ~[spring-integration-core-5.2.4.RELEASE.jar:5.2.4.RELEASE]
at org.springframework.integration.amqp.support.DefaultAmqpHeaderMapper.createJsonResolvableTypHeaderInAny(DefaultAmqpHeaderMapper.java:169) [spring-integration-amqp-5.2.4.RELEASE.jar:5.2.4.RELEASE].
I know it's just a warning, but I would like to know the way it can be avoided.
Thanks in advance
This has been fixed in Spring Integration 5.2.5
: https://github.com/spring-projects/spring-integration/issues/3223. Please, consider to upgrade to the latest Spring Boot 2.2.6
and it is included over there. See Spring Boot docs how to override dependency versions: https://docs.spring.io/spring-boot/docs/2.2.6.RELEASE/reference/html/using-spring-boot.html#using-boot-maven
You can apply workarounds otherwise as mentioned in that GH issue.