Reputation: 137
I'm on JRE 8 and have following dependency as well however I'm still getting java.lang.NoSuchMethodError: javax.ws.rs.core.MultivaluedMap.addAll error.
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
</dependency>
I'm unsure if I'm using the correct dependency or not. Can someone help identify the issue?
2021-04-30 21:32:51,941 [ERROR][misAdminScheduler-3] {correlationid=2366ac7f-937b-4790-922f-5d6301b105fa, requestorid=Billing File Sender} org.springframework.scheduling.support.TaskUtils$LoggingErrorHandler:handleError = Unexpected error occurred in scheduled task.
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) ~[jersey-client-2.26.jar:?]
at org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:222) ~[jersey-client-2.26.jar:?]
at org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:60) ~[jersey-client-2.26.jar:?]
at com.testsite.sc.impl.ListFilesJob.createInvocation(ListFilesJob.java:74) ~[my-sdk-0.14.0-RC9.jar:?]
Upvotes: 1
Views: 3032
Reputation: 311428
According to its javadoc, addAll
was only added to this interface in version 2.0, and you're using 1.1.1.
You could either upgrade your dependency's version to 2.0, or rewrite your code to "manually" iterate over the items you want to add and add them one by one to the map instead of using addAll
.
Upvotes: 1