NoSuchMethodError on Values.lazy (Jersey 2.5.1)

為{幸葍}努か 提交于 2019-12-06 21:35:27

Based on informations provided in JERSEY-2394 your class-path contains these libraries:

rw-rr- 1 root root 94774 Feb 10 12:02 cxf-rt-databinding-jaxb-2.3.2.jar
rw-rr- 1 root root 341446 Feb 10 12:02 cxf-rt-frontend-jaxws-2.3.2.jar
rw-rr- 1 root root 20020 Feb 10 12:02 jackson-jaxrs-base-2.2.3.jar
rw-rr- 1 root root 15243 Feb 10 12:02 jackson-jaxrs-json-provider-2.2.3.jar
rw-rr- 1 root root 25985 Feb 10 12:02 jackson-module-jaxb-annotations-2.2.3.jar
rw-rr- 1 root root 50034 Feb 10 12:02 jackson-module-jsonSchema-2.1.0.jar
rw-rr- 1 root root 79309 Feb 10 12:02 javax.json-1.0.2.jar
rw-rr- 1 root root 19754 Feb 10 12:02 javax.json-api-1.0.jar
rw-rr- 1 root root 876610 Feb 10 12:02 jaxb-impl-2.1.13.jar
rw-rr- 1 root root 226915 Feb 10 12:02 jaxen-1.1.1.jar
rw-rr- 1 root root 159742 Feb 10 14:02 jersey-client-2.5.1.jar
rw-rr- 1 root root 700399 Feb 10 14:02 jersey-common-2.5.1.jar
rw-rr- 1 root root 15684 Feb 10 14:02 jersey-container-servlet-2.5.1.jar
rw-rr- 1 root root 52593 Feb 10 12:02 jersey-container-servlet-core-2.1.jar
rw-rr- 1 root root 6412 Feb 10 14:02 jersey-media-json-processing-2.5.1.jar
rw-rr- 1 root root 63067 Feb 10 12:02 jersey-media-multipart-2.1.jar
rw-rr- 1 root root 828016 Feb 10 14:02 jersey-server-2.5.1.jar
rw-rr- 1 root root 86540 Feb 10 12:02 json4s-ast_2.10-3.2.4.jar
rw-rr- 1 root root 568890 Feb 10 12:02 json4s-core_2.10-3.2.4.jar
rw-rr- 1 root root 74565 Feb 10 12:02 json4s-ext_2.10-3.2.4.jar
rw-rr- 1 root root 39952 Feb 10 12:02 json4s-jackson_2.10-3.2.4.jar
rw-rr- 1 root root 68734 Feb 10 12:02 json4s-native_2.10-3.2.4.jar
rw-rr- 1 root root 7814 Feb 10 12:02 jsonp-jaxrs-1.0.jar
rw-rr- 1 root root 121047 Feb 10 12:02 swagger-jaxrs_2.10-1.3.2.jar
rw-rr- 1 root root 45719 Feb 10 12:02 swagger-jersey2-jaxrs_2.10-1.3.2.jar

You have 2 Jersey jars with different version than 2.5.1 - jersey-media-multipart-2.1.jar and jersey-container-servlet-core-2.1.jar. The latter one causes the problem you have. Lines from the stacktrace correspond with the idea that 2.1 version of jersey servlet core is used instead of 2.5.1 (see WebComponent from 2.1). The solution would be to remove the old jars.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!