cf-java-client-sap icon indicating copy to clipboard operation
cf-java-client-sap copied to clipboard

getting error DefaultConnectionContext.Builder doesn't have additionalHttpClientConfiguration method

Open vedraiyani opened this issue 3 years ago • 1 comments

While executing the example given in readme got the following error with version 2.1.1

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

    com.sap.cloudfoundry.client.facade.adapters.CloudFoundryClientFactory.lambda$createConnectionContext$0(CloudFoundryClientFactory.java:57)   

The following method did not exist:

    'reactor.netty.http.client.HttpClient reactor.netty.http.client.HttpClient.metrics(boolean)'

The method's class, reactor.netty.http.client.HttpClient, is available from the following locations:

    jar:file:/C:/Users/I343785/.m2/repository/io/projectreactor/netty/reactor-netty-http/1.0.7/reactor-netty-http-1.0.7.jar!/reactor/netty/http/client/HttpClient.class

The class hierarchy was loaded from the following locations:

    reactor.netty.http.client.HttpClient: file:/C:/Users/I343785/.m2/repository/io/projectreactor/netty/reactor-netty-http/1.0.7/reactor-netty-http-1.0.7.jar
    reactor.netty.transport.ClientTransport: file:/C:/Users/I343785/.m2/repository/io/projectreactor/netty/reactor-netty-core/1.0.7/reactor-netty-core-1.0.7.jar
    reactor.netty.transport.Transport: file:/C:/Users/I343785/.m2/repository/io/projectreactor/netty/reactor-netty-core/1.0.7/reactor-netty-core-1.0.7.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of reactor.netty.http.client.HttpClient

vedraiyani avatar Feb 23 '22 10:02 vedraiyani

Hi @vedraiyani , as I can see from the error, you are override somewhere in your pom.xml reactor-netty version with 1.0.7 and this project is still using reactor-netty 0.9.25. There are breaking changes between reactor-netty 0.9 and 1.0 and that's why you observed this error. This project is facade for cf-java-client. I would like to know what is your use case of cf-java-client project?

theghost5800 avatar Apr 06 '22 09:04 theghost5800