0

I am using gradle6.8.1 and jdk15 to construct my Spring microservice project. While running my project test I am getting these errors:

Handler dispatch failed; nested exception is
   java.lang.NoSuchMethodError: 'void javax.ws.rs.core.MultivaluedMap.addAll(java.lang.Object, java.lang.Object[])'

org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is 
 java.lang.NoSuchMethodError: 'void javax.ws.rs.core.MultivaluedMap.addAll(java.lang.Object, java.lang.Object[])'

I don't have idea about this error, but it was working in other machines. So, I have checked with various versions of gradle and java sdk but no use. And I also tried after clear gradle cache but its not working.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
  • Vast majority of `NoSuchMethodError`s are coming for mismatched jar versions on classpath. inpsect your classpath for presence of jax-rs related jars and see if all versions are in sync. – rkosegi Feb 04 '21 at 14:06
  • The problem is that you are compiling against one version of `javax.ws.rs.*` and using a different version at runtime. In your case, you appear to have an issue with the way that you **deploy** the application and its dependencies ... to your test platform. – Stephen C Feb 04 '21 at 14:52

0 Answers0