I have developed one Rest Web Service application in java and deployed the WAR file. While starting the server, the following error occurs.
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)
I have added following jar files to my project.
I have downloaded jersey-common jar version 2.24.1.
I am not able to find where the actual issue is? Please help.
Your jersey-server.jar is 2.1
change it to 2.24.1
.
All Jersey dependencies should be in the same version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With