新浪sae 上傳java war包出現not a javax.servlet.Servlet

common_util發表於2016-08-06

新浪sae 上傳java war包出現not a javax.servlet.Servlet

[06/Aug/2016:12:52:38 +0800] JAVA_Error: Failed startup of context c.s.s.w.SaeWebAppContext@67310230{/,file:/data1/jetty_work/198/mystyleapp/jetty-0.0.0.0-10043-root.war-_-any-5489033262459231873.dir/webapp/,STARTING}{/data1/www/htdocs/198/mystyleapp/1/root.war}
MultiException[javax.servlet.UnavailableException: Servlet class com.style8.servlet.CoreServlet is not a javax.servlet.Servlet, javax.servlet.UnavailableException: Servlet class com.style8.servlet.CoreTestServlet is not a javax.servlet.Servlet, javax.servlet.UnavailableException: Servlet class com.style8.servlet.CoreServlet is not a javax.servlet.Servlet, javax.servlet.UnavailableException: Servlet class com.style8.servlet.CoreTestServlet is not a javax.servlet.Servlet]
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:842)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)
at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:498)
at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:146)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileChanged(ScanningAppProvider.java:198)
at org.eclipse.jetty.deploy.providers.WebAppProvider.fileChanged(WebAppProvider.java:412)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileChanged(Scannin yq34.javaruntime

解決方案:
刪除自己工程下引用的servlet-api包jar包,重新打包釋出。

原因:
sinasae伺服器上jetty已經用一個servlet-api.jar包。

相關文章