The exception is raised during the following call
Response response = client().target(rpTarget())
.path(clusterPath())
.queryParam("api-version", csmv2ApiVersion())
.request(MediaType.APPLICATION_JSON)
.get();
The full stack of the exception is
java.lang.NoSuchMethodError: javax.ws.rs.core.MultivaluedMap.addAll(Ljava/lang/Object;[Ljava/lang/Object;)V
at org.glassfish.jersey.client.ClientRequest.accept(ClientRequest.java:335)
at org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:221)
at org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:59)
....
I build my application jar using "mvn package" and the build output has the following
[INFO] Including javax.ws.rs:javax.ws.rs-api:jar:2.0.1 in the shaded jar.
[INFO] Including org.glassfish.jersey.core:jersey-common:jar:2.19 in the shaded jar.
I seem to be using the latest version of javax.ws.rs-api.jar
that seems to contain the definition of MultivaluedMap.addAll
method, but I still keep getting this exception.
Could you please let me know what I am missing?