java – NoSuchFieldError:INCLUDE_ALL(Web服务)

前端之家收集整理的这篇文章主要介绍了java – NoSuchFieldError:INCLUDE_ALL(Web服务)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在 java中开发了一个Rest Web Service应用程序并部署了WAR文件.启动服务器时,会发生以下错误.
SEVERE: StandardWrapper.Throwable
java.lang.NoSuchFieldError: INCLUDE_ALL
    at org.glassfish.jersey.server.ResourceConfig$State.<init>(ResourceConfig.java:109)
    at org.glassfish.jersey.server.ResourceConfig.<init>(ResourceConfig.java:350)
    at org.glassfish.jersey.servlet.WebComponent.createResourceConfig(WebComponent.java:425)
    at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:290)
    at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:167)
    at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:349)
    at javax.servlet.GenericServlet.init(GenericServlet.java:158)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1282)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1195)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1085)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5318)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5610)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

我已将以下jar文件添加到我的项目中.

我已经下载了jersey-common jar版本2.24.1.

我无法找到实际问题的位置?请帮忙.

解决方法

您的jersey-server.jar是2.1将其更改为2.24.1. 所有Jersey依赖项应该在同一版本中.
原文链接:https://www.f2er.com/java/127042.html

猜你在找的Java相关文章