您好我正在使用泽西编写网络服务。我尝试访问Web服务时遇到servlet init()异常。
异常堆栈跟踪:
HTTP状态500 - servlet jersey-serlvet的Servlet.init()抛出 例外
输入例外报告
消息Servlet.init()for servlet jersey-serlvet抛出异常
description服务器遇到阻止它的内部错误 完成此请求。
例外
javax.servlet.ServletException:Servlet的Servlet.init() 泽西 - 塞尔维特抛出异常 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:607) org.apache.tomcat.util.net.JIoEndpoint $ SocketProcessor.run(JIoEndpoint.java:314) java.util.concurrent.ThreadPoolExecutor.runWorker(未知来源) java.util.concurrent.ThreadPoolExecutor $ Worker.run(未知来源) org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(未知来源)根本原因
java.lang.IllegalAccessError:尝试访问方法 com.sun.jersey.core.reflection.ReflectionHelper.getContextClassLoader()Ljava /郎/类加载器; 来自com.sun.jersey.spi.scanning.AnnotationScannerListener类 com.sun.jersey.spi.scanning.AnnotationScannerListener。(AnnotationScannerListener.java:89) com.sun.jersey.spi.scanning.PathProviderScannerListener。(PathProviderScannerListener.java:59) com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:79) com.sun.jersey.api.core.WebAppResourceConfig.init(WebAppResourceConfig.java:100) com.sun.jersey.api.core.WebAppResourceConfig。(WebAppResourceConfig.java:87) com.sun.jersey.api.core.WebAppResourceConfig。(WebAppResourceConfig.java:72) com.sun.jersey.spi.container.servlet.WebComponent.getWebAppResourceConfig(WebComponent.java:672) com.sun.jersey.spi.container.servlet.ServletContainer.getDefaultResourceConfig(ServletContainer.java:414) com.sun.jersey.spi.container.servlet.ServletContainer.getDefaultResourceConfig(ServletContainer.java:581) com.sun.jersey.spi.container.servlet.WebServletConfig.getDefaultResourceConfig(WebServletConfig.java:87) com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:703) com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:678) com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:203) com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373) com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556) javax.servlet.GenericServlet.init(GenericServlet.java:158) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:607) org.apache.tomcat.util.net.JIoEndpoint $ SocketProcessor.run(JIoEndpoint.java:314) java.util.concurrent.ThreadPoolExecutor.runWorker(未知来源) java.util.concurrent.ThreadPoolExecutor $ Worker.run(未知来源) org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(Unknown Source)note完整的堆栈跟踪 根本原因可在Apache Tomcat /7.0.54日志中。