title: HTTP Status 500 - Servlet.init() for servlet Jersey Web Application threw exception
body: <p>index.html</p>
  
  <pre><code>  &lt;html&gt;
    &lt;body&gt;
     &lt;h2&gt;Jersey RESTful Web Application!&lt;/h2&gt;
     &lt;p&gt;&lt;a href="webresources/myresource"&gt;Jersey resource&lt;/a&gt;
      &lt;p&gt;Visit the &lt;a href="http://jersey.java.net"&gt;Project Jersey website&lt;/a&gt;
      for more information on Jersey!
     &lt;/body&gt;
     &lt;/html&gt;
  </code></pre>
  
  <p>MyResource.java</p>
  
  <pre><code>@Path("/myresource")
  public class MyResource {
  
  /** Method processing HTTP GET requests, producing "text/plain" MIME media
   * type.
   * @return String that will be send back as a response of type "text/plain".
   */
  @GET 
  @Produces("text/plain")
  public String getIt() {
      return "Hi there!";
  }
  }
  </code></pre>
  
  <p>Error is Comming </p>
  
  <pre><code>  HTTP Status 500 - Servlet.init() for servlet Jersey Web Application threw        exception
  
   --------------------------------------------------------------------------------
  
  type Exception report
  
  message Servlet.init() for servlet Jersey Web Application threw exception
  
  description The server encountered an internal error that prevented it from      fulfilling this request.
  
  exception 
  
  javax.servlet.ServletException: Servlet.init() for servlet Jersey Web   Application threw exception
       org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
  org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
  org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
  org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  java.lang.Thread.run(Thread.java:745)
  
  
  root cause 
  
  java.lang.NoSuchMethodError: com.sun.jersey.core.reflection.ReflectionHelper.getContextClassLoaderPA()Ljava/security/PrivilegedAction;
         com.sun.jersey.spi.scanning.AnnotationScannerListener.&lt;init&gt;(AnnotationScannerListener.java:94)
        com.sun.jersey.spi.scanning.PathProviderScannerListener.&lt;init&gt;(PathProviderScannerListener.java:59)
       com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:79)
      com.sun.jersey.api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:104)
      com.sun.jersey.api.core.PackagesResourceConfig.&lt;init&gt;(PackagesResourceConfig.java:78)
       com.sun.jersey.api.core.PackagesResourceConfig.&lt;init&gt;(PackagesResourceConfig.java:89)
       com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:696)
       com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:674)
       com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:205)
      com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:376)
       com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:559)
       javax.servlet.GenericServlet.init(GenericServlet.java:158)
       org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
       org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
      org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
      org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
       org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
       java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
        org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      java.lang.Thread.run(Thread.java:745)
  
  
  note The full stack trace of the root cause is available in the Apache      Tomcat/7.0.67 logs.
  </code></pre>