Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spring-integration-amqp 5.5.2 not compitible with stream-binder-rabbit 3.1.3 #3606

Closed
ahunigel opened this issue Jul 30, 2021 · 2 comments
Closed
Labels
status: duplicate There is already an issue similar to this. The link to it should be present

Comments

@ahunigel
Copy link

In what version(s) of Spring Integration are you seeing this issue?

5.5.2.RELEASE

Describe the bug

spring-integration-amqp 5.5.2 not compitible with stream-binder-rabbit 3.1.3


2021-07-30 10:49:32.702 DEBUG 43584 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : Application failed to start due to an exception

java.lang.NoSuchMethodError: org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter.<init>(Lorg/springframework/amqp/rabbit/listener/AbstractMessageListenerContainer;)V
	at org.springframework.cloud.stream.binder.rabbit.RabbitMessageChannelBinder.createConsumerEndpoint(RabbitMessageChannelBinder.java:517) ~[spring-cloud-stream-binder-rabbit-3.1.3.jar:3.1.3]
	at org.springframework.cloud.stream.binder.rabbit.RabbitMessageChannelBinder.createConsumerEndpoint(RabbitMessageChannelBinder.java:136) ~[spring-cloud-stream-binder-rabbit-3.1.3.jar:3.1.3]
	at org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.doBindConsumer(AbstractMessageChannelBinder.java:408) ~[spring-cloud-stream-3.1.3.jar:3.1.3]
	at org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.doBindConsumer(AbstractMessageChannelBinder.java:91) ~[spring-cloud-stream-3.1.3.jar:3.1.3]
	at org.springframework.cloud.stream.binder.AbstractBinder.bindConsumer(AbstractBinder.java:143) ~[spring-cloud-stream-3.1.3.jar:3.1.3]
	at org.springframework.cloud.stream.binding.BindingService.doBindConsumer(BindingService.java:177) ~[spring-cloud-stream-3.1.3.jar:3.1.3]
	at org.springframework.cloud.stream.binding.BindingService.bindConsumer(BindingService.java:134) ~[spring-cloud-stream-3.1.3.jar:3.1.3]
	at org.springframework.cloud.stream.binding.AbstractBindableProxyFactory.createAndBindInputs(AbstractBindableProxyFactory.java:118) ~[spring-cloud-stream-3.1.3.jar:3.1.3]
	at org.springframework.cloud.stream.binding.InputBindingLifecycle.doStartWithBindable(InputBindingLifecycle.java:58) ~[spring-cloud-stream-3.1.3.jar:3.1.3]
	at java.util.LinkedHashMap$LinkedValues.forEach(LinkedHashMap.java:608) ~[na:1.8.0_191]
	at org.springframework.cloud.stream.binding.AbstractBindingLifecycle.start(AbstractBindingLifecycle.java:57) ~[spring-cloud-stream-3.1.3.jar:3.1.3]
	at org.springframework.cloud.stream.binding.InputBindingLifecycle.start(InputBindingLifecycle.java:34) ~[spring-cloud-stream-3.1.3.jar:3.1.3]
	at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) ~[spring-context-5.3.9.jar:5.3.9]
	at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) ~[spring-context-5.3.9.jar:5.3.9]
	at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) ~[spring-context-5.3.9.jar:5.3.9]
	at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_191]
	at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155) ~[spring-context-5.3.9.jar:5.3.9]
	at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123) ~[spring-context-5.3.9.jar:5.3.9]
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:935) ~[spring-context-5.3.9.jar:5.3.9]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) ~[spring-context-5.3.9.jar:5.3.9]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.5.3.jar:2.5.3]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) [spring-boot-2.5.3.jar:2.5.3]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434) [spring-boot-2.5.3.jar:2.5.3]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:338) [spring-boot-2.5.3.jar:2.5.3]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) [spring-boot-2.5.3.jar:2.5.3]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1332) [spring-boot-2.5.3.jar:2.5.3]
	at com.ectrs.cloud.admin.AdminApp.main(AdminApp.java:45) [classes/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_191]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_191]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_191]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_191]
	at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:64) [idea_rt.jar:na]

2021-07-30 10:49:32.703 ERROR 43584 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
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:

    org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter.<init>(Lorg/springframework/amqp/rabbit/listener/AbstractMessageListenerContainer;)V

The method's class, org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter, is available from the following locations:

    jar:file:/C:/Users/nigel.zheng/.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/nigel.zheng/.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/nigel.zheng/.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/nigel.zheng/.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/nigel.zheng/.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

To Reproduce

Steps to reproduce the behavior.

Expected behavior

No error happens.

Sample

@Configuration
@SpringBootApplication
@EnableAutoConfiguration
@EnableDiscoveryClient
@EnableAdminServer
@EnablePublisher
@EnableScheduling
@EnableOAuth2Sso
@EnableBinding({Processor.class})
public class AdminApp extends WebSecurityConfigurerAdapter {
  public static void main(String[] args) {
    SpringApplication.run(AdminApp.class, args);
  }
}
dependencies {
    implementation 'org.springframework.cloud:spring-cloud-starter-bus-amqp'
    implementation "org.springframework.boot:spring-boot-starter-web"

    implementation 'de.codecentric:spring-boot-admin-starter-server'//:2.0.6
    implementation "org.springframework.cloud:spring-cloud-starter-security"
    //implementation "org.springframework.cloud:spring-cloud-starter-oauth2"
    implementation "org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure"
    implementation "org.springframework.boot:spring-boot-starter-mail"

    implementation group: 'org.elasticsearch.client', name: 'elasticsearch-rest-high-level-client'//, version: '7.11.1'
    implementation group: 'org.elasticsearch.client', name: 'transport'//, version: '7.11.1'
    //implementation group: 'org.elasticsearch', name: 'elasticsearch', version: '7.11.1'
    implementation "org.elasticsearch.client:x-pack-transport"//:7.11.1

    implementation group: 'org.mock-server', name: 'mockserver-junit-rule'//, version: '5.11.1'

    testImplementation group: 'org.mock-server', name: 'mockserver-netty'//, version: '5.11.1'

}
@ahunigel ahunigel added status: waiting-for-triage The issue need to be evaluated and its future decided type: bug labels Jul 30, 2021
@ahunigel
Copy link
Author

if downgrade spring-integration to 5.5.1, all things are good

configurations.all {
    resolutionStrategy.eachDependency { details ->
        if (details.requested.group == 'org.springframework.integration') {
            details.useVersion "5.5.1"
        }
    }
}

@artembilan artembilan added status: duplicate There is already an issue similar to this. The link to it should be present and removed status: waiting-for-triage The issue need to be evaluated and its future decided type: bug labels Jul 30, 2021
@artembilan
Copy link
Member

Know issue. Your workaround is correct until the next Rabbit Binder release : #3601. Sorry for inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate There is already an issue similar to this. The link to it should be present
Projects
None yet
Development

No branches or pull requests

2 participants