在你說「DUPLICATE」之前,我向你保證我看過其他人。它們與我所要求的完全不同。所以我有網絡應用程序工作,更換齒輪,並回到它,現在我得到這個。HTTP狀態500 - servlet的Servlet.init()異常
javax.servlet.ServletException: Servlet.init() for servlet com.xxxx.xxx.xxx.AppConfig threw exception
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)
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: javax.ws.rs.core.Application.getProperties()Ljava/util/Map;
org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:309)
org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:315)
org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:170)
org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:358)
javax.servlet.GenericServlet.init(GenericServlet.java:158)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)
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)
我看着幾人都具有其它類似的問題,總有像RequestedMaping(blah)
但多數民衆贊成在東西是不同的。我正在做一個寧靜的服務,而我在我的項目中所有的工作是Path(blah)
。我認爲他們是相似的,但那就是它。其他問題的解決方案之一是pu *.do
或類似請求的映射中的內容,但即使我有我的工作,我從來沒有在項目中。
我認爲我所做項目的唯一區別是增加了第三級到了AppConfig getClasses()
這裏:
@ApplicationPath("/rest")
public class AppConfig extends Application {
private static final Logger LOGGER = LoggerFactory.getLogger(AppConfig.class);
/**
* @see Application#getClasses()
*/
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> s = new HashSet<Class<?>>();
s.add(EntityManagementResource.class);
s.add(AccumuloInterfaceResource.class);
s.add(JacksonJsonProvider.class);
return s;
}
我沒有足夠的AccumuloInterfaceResource.class
以前有,現在怎麼辦?
感謝您的任何。
謝謝,我會研究它。 – erp
沒錯,一個同事更新了pom,就像你所描述的那樣。謝謝! – erp