opentracing-contrib / java-spring-cloud

Distributed tracing for Spring Boot, Cloud and other Spring projects
Apache License 2.0
390 stars 143 forks source link

Application doesn't startup in Spring Messaging 5.3.2 #308

Open SrMouraSilva opened 3 years ago

SrMouraSilva commented 3 years ago

Description

In opentracing-spring-cloud-websocket-starter WebsocketAutoConfiguration calls a method that suffers a break change in Spring Messaging 5.3.2

Log

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

    io.opentracing.contrib.spring.cloud.websocket.WebsocketAutoConfiguration.tracingInboundChannelInterceptor(WebsocketAutoConfiguration.java:45)

The following method did not exist:

    'org.springframework.messaging.support.AbstractSubscribableChannel org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurationSupport.clientInboundChannel()'

The method's class, org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurationSupport, is available from the following locations:

    jar:file:[...]/.gradle/caches/modules-2/files-2.1/org.springframework/spring-websocket/5.3.2/7a0e2a689c3dbbb084b59cd7188d37164488af31/spring-websocket-5.3.2.jar!/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurationSupport.class

The class hierarchy was loaded from the following locations:

    org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurationSupport: file:[...]/.gradle/caches/modules-2/files-2.1/org.springframework/spring-websocket/5.3.2/7a0e2a689c3dbbb084b59cd7188d37164488af31/spring-websocket-5.3.2.jar
    org.springframework.messaging.simp.config.AbstractMessageBrokerConfiguration: file:[...]/.gradle/caches/modules-2/files-2.1/org.springframework/spring-messaging/5.3.2/d4b189cd434be6790128f4b4397998c655cfecea/spring-messaging-5.3.2.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurationSupport

Process finished with exit code 0

"Solution"

I disabled this configuration :(

@EnableAutoConfiguration(exclude=[WebsocketAutoConfiguration::class])