Eclipse - 本地GAE无法加载servlet

时间:2017-08-23 15:05:08

标签: eclipse google-app-engine servlets

在Eclipse Oxygen 4.7中运行GAE项目时,服务器不会加载任何servlet。在日志中出现所有servlet的错误:

ago 23, 2017 3:00:38 PM com.google.appengine.tools.development.ApiProxyLocalImpl log
GRAVE: javax.servlet.ServletContext log: unavailable
javax.servlet.UnavailableException: Servlet class <HERE the servlet class name> is not a javax.servlet.Servlet
    at org.mortbay.jetty.servlet.ServletHolder.checkServletType(ServletHolder.java:362)
    at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:243)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:224)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:268)
    at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:284)
    at com.google.appengine.tools.development.AutomaticInstanceHolder.startUp(AutomaticInstanceHolder.java:26)
    at com.google.appengine.tools.development.AbstractModule.startup(AbstractModule.java:87)
    at com.google.appengine.tools.development.Modules.startup(Modules.java:105)
    at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:271)
    at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47)
    at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:219)
    at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:217)
    at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:359)
    at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:47)
    at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:223)
    at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:214)

在web.xml上很好地定义了servlet,因为如果将项目部署到GAE,它就可以工作。

我已经使用Eclipse Neon进行了测试,但结果相同。

有什么想法吗?

0 个答案:

没有答案