Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Dependency conflict #114

Closed
akurniawan opened this issue Apr 15, 2016 · 3 comments
Closed

Dependency conflict #114

akurniawan opened this issue Apr 15, 2016 · 3 comments

Comments

@akurniawan
Copy link

Hi, thanks for the driver!

We encounter a problem with your consul-client, because apparently your driver requires javax.ws.rs.core as one of the dependencies. Unfortunately, we also using hadoop client that requires jersey-core plugin which implements also javax/ws/rs/core/Response.class, and jersey-core plugin used by hadoop is the old one (version 1.9). With jersey plugin there we can't use your driver as it will give us an errror "NoSuchMethodException" from Response.class because the jersey plugin doesn't contain .close() method.
Do you have any work-around for this? thanks

@rickfast
Copy link
Owner

I can't think of one off the top of my head unfortunately. JAX-RS seemed like a good idea initially, and it's worked out great for some clients. Ultimately, I need to rework the client to either A. have minimal dependencies or B. use a shaded JAR for the basic dependencies. I can try to relocate JAX-RS and Jackson into the com.orbitz package and ship them in the shadow JAR, which would allow other versions of JAX-RS to live on the classpath. I'll try to find time in the near future to try the shaded JAR idea.

@Lavignotte
Copy link

Hi,

I faced the same problem a few days ago in a Maven project and solved it by placing consul-client and javax.ws.rs.core dependencies at the top of the pom.xml file.
This way the classloader takes the correct version of the Response class in priority.
Hope this helps !
Unless Hadoop needs its specific version...

Pierre

@rickfast
Copy link
Owner

rickfast commented May 2, 2016

I've removed JAX-RS in version 0.11.0. The new HTTP client is shaded into the JAR, so it shouldn't cause any classpath issues

@rickfast rickfast closed this as completed May 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants