samarth khandelwal
samarth khandelwal

Reputation: 26

Getting : Correct classpath for reactor.netty.resources.ConnectionProvider$Builder while running spring project

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

org.springframework.cloud.gateway.config.GatewayAutoConfiguration$NettyConfiguration.buildConnectionProvider(GatewayAutoConfiguration.java:798)

The following method did not exist:

reactor.netty.resources.ConnectionProvider$Builder.evictInBackground(Ljava/time/Duration;)Lreactor/netty/resources/ConnectionProvider$ConnectionPoolSpec;

The method's class, reactor.netty.resources.ConnectionProvider$Builder, is available from the following locations:

jar:file:/C:/Users/Sam/.m2/repository/io/projectreactor/netty/reactor-netty/0.9.12.RELEASE/reactor-netty-0.9.12.RELEASE.jar!/reactor/netty/resources/ConnectionProvider$Builder.class

The class hierarchy was loaded from the following locations:

reactor.netty.resources.ConnectionProvider.Builder: file:/C:/Users/Sam/.m2/repository/io/projectreactor/netty/reactor-netty/0.9.12.RELEASE/reactor-netty-0.9.12.RELEASE.jar
reactor.netty.resources.ConnectionProvider.ConnectionPoolSpec: file:/C:/Users/Sam/.m2/repository/io/projectreactor/netty/reactor-netty/0.9.12.RELEASE/reactor-netty-0.9.12.RELEASE.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of reactor.netty.resources.ConnectionProvider$Builder

Process finished with exit code 1

Upvotes: 1

Views: 3769

Answers (1)

Andy Wilkinson
Andy Wilkinson

Reputation: 116061

The method's that missing is new in Reactor Netty 0.9.13.RELEASE and you're using 0.9.12.RELEASE at the moment. This version is coming from Spring Boot 2.3.4's dependency management. Spring Boot 2.3.5 upgraded to Reactor Netty 0.9.13.RELEASE so you can fix the problem by upgrading to Spring Boot 2.3.5 or later.

Given that you're using Spring Cloud Hoxton.SR11 which was released in April 2021, I would recommend upgrading to a similarly recent Spring Boot 2.3.x release. 2.3.11.RELEASE is the latest available release at the time of writing.

Upvotes: 1

Related Questions