Open sverhoeven opened 6 years ago
In https://github.com/spotify/docker-client/blob/master/pom.xml it depends on jersey 2.22.2.
In ./gradlew dependencies
jersey 1.19 is a dependency of several hadoop libraries.
The MultivaluedMap.addAll was introduced in JAX-RS 2 which jersey2 implements.
Any suggestions on fixing this ? Maybe hadoop also works with the 2.22.2 version of jersey ?
I think one of Hadoop dependencies pulls in the JAX-RS 1 version of MultivaluedMap. I could exclude that dependency, but this will probably break hadoop.
We might be able to shade the javax/ws/rs/ classes in jersey-core-1.9.jar using http://imperceptiblethoughts.com/shadow/#relocating_packages so hadoop uses the shaded javax/ws/rs/ and spotify uses the ones that ship with java.
@jmaassen do you any experience shading?
No experience with shading....
What we used to do in an earlier incarnation of Xenon is use separate class loaders for the different adaptors.
Since I had similar issues with the GridFTP and SSH adaptor clashing over a dependency, this may be the time to seriously start looking for a solution
I'll compare some potential solutions
The 3.0.0 hadoop client shadows it's Jersey deps.
Adding integrationTestCompile 'org.apache.hadoop:hadoop-client:3.0.0'
as dependency and using Xenon 2.4.0 gives no errors.
The ./gradlew dependencies
contains org.apache.hadoop:hadoop-common:2.8.1 -> 3.0.0
and com.sun.jersey:jersey-json:1.19
so this probably works because the classpath order is changed.
In branch https://github.com/NLeSC/xenon-cli/tree/prep-xenon230 I want to use the Xenon v2.3.0, but the integration tests are failing with
The new dependencies of Xenon are conflicting the docker rule used in the integration tests.