While using spring-boot 2.5.2
and 2.5.3
(as of 03/08/2020) with spring-cloud 2020.0.3
, I have an exception that wasn't present in earlier versions (2.5.1
and earlier) at startup.
Here is the the full error log
2021-08-03 21:52:34.209 WARN 39736 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'inputBindingLifecycle'; nested exception is java.lang.NoSuchMethodError: 'void org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter.<init>(org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer)'
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.cloud.stream.binder.rabbit.RabbitMessageChannelBinder.createConsumerEndpoint(RabbitMessageChannelBinder.java:517)
The following method did not exist:
'void org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter.<init>(org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer)'
The method's class, org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter, is available from the following locations:
jar:file:/C:/Users/Nidhal/.gradle/caches/modules-2/files-2.1/org.springframework.integration/spring-integration-amqp/5.5.2/7195ed265b0f6c24e52c3ed84253f7974b2d5014/spring-integration-amqp-5.5.2.jar!/org/springframework/integration/amqp/inbound/AmqpInboundChannelAdapter.class
The class hierarchy was loaded from the following locations:
org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter: file:/C:/Users/Nidhal/.gradle/caches/modules-2/files-2.1/org.springframework.integration/spring-integration-amqp/5.5.2/7195ed265b0f6c24e52c3ed84253f7974b2d5014/spring-integration-amqp-5.5.2.jar
org.springframework.integration.endpoint.MessageProducerSupport: file:/C:/Users/Nidhal/.gradle/caches/modules-2/files-2.1/org.springframework.integration/spring-integration-core/5.5.2/d6822cb2d758d2a5d821879778c31120b4a3c86c/spring-integration-core-5.5.2.jar
org.springframework.integration.endpoint.AbstractEndpoint: file:/C:/Users/Nidhal/.gradle/caches/modules-2/files-2.1/org.springframework.integration/spring-integration-core/5.5.2/d6822cb2d758d2a5d821879778c31120b4a3c86c/spring-integration-core-5.5.2.jar
org.springframework.integration.context.IntegrationObjectSupport: file:/C:/Users/Nidhal/.gradle/caches/modules-2/files-2.1/org.springframework.integration/spring-integration-core/5.5.2/d6822cb2d758d2a5d821879778c31120b4a3c86c/spring-integration-core-5.5.2.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter
Here is a reproducible example : https://github.com/dogganidhal/spring-rabbit-demo
Note that there is 3 branches for the spring-boot versions 2.5.1
, 2.5.2
and 2.5.3
for ease of use
Comment From: snicoll
@dogganidhal thanks for the report and the sample but there's nothing we can do about that. This is a duplicate of https://github.com/spring-projects/spring-integration/issues/3601. I've overridden the Spring Integration version to 5.5.3-SNAPSHOT
and your sample starts.
@artembilan is 5.5.3
due any time soon considering a release for 5.4.x
was done earlier?
Comment From: artembilan
It is scheduled for August 17th: just in time for upcoming Spring Boot release!
Unfortunately that early released Spring Integration 5.4.9
has the same incompatible byte code problem, so we scheduled 5.4.10
that day, too.
Sorry for inconvenience.