http 503 error gwt jetty server SERVICE_UNAVAILABL

2020-03-25 17:23发布

i get 503 error from eclipse integrated jetty server while running project in a web browser. i get this error since i changed the gae application-id of the project.

java.lang.ClassNotFoundException: com.google.api.server.spi.SystemServiceServlet
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:176)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.mortbay.util.Loader.loadClass(Loader.java:91)
at org.mortbay.util.Loader.loadClass(Loader.java:71)
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:242)
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:191)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:239)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:146)
at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)
    21.08.2012 16:09:42 com.google.appengine.tools.development.ApiProxyLocalImpl log
    SCHWERWIEGEND: javax.servlet.ServletContext log: unavailable
    javax.servlet.UnavailableException: com.google.api.server.spi.SystemServiceServlet
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:79)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:242)
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(JettyContainerS ervice.java:191)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:239)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:146)
at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)

    21.08.2012 16:09:42 com.google.apphosting.utils.jetty.JettyLogger warn
    WARNUNG: failed SystemServiceServlet: java.lang.NullPointerException
    21.08.2012 16:09:43 com.google.apphosting.utils.jetty.JettyLogger warn
    WARNUNG: Failed startup of context    com.google.appengine.tools.development.DevAppEngineWebAppContext@9f4160a{/,C:\Users\dp\work        space\fooApp\war}
    java.lang.NullPointerException
     at java.lang.Class.isAssignableFrom(Native Method)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256)
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:191)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:239)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:146)
at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)
    21.08.2012 16:09:46 com.google.appengine.tools.development.DevAppServerImpl start
    INFO: The server is running at http://localhost:8888/
    21.08.2012 16:09:46 com.google.appengine.tools.development.DevAppServerImpl start
    INFO: The admin console is running at http://localhost:8888/_ah/admin

this is my web.xml file

<!-- Default page to serve -->
<welcome-file-list>
   <welcome-file>fooApp.html</welcome-file>
</welcome-file-list>
<servlet>
   <servlet-name>phonegapfileapi</servlet-name>
   <servlet           class>com.googlecode.gwtphonegap.server.file.FileRemoteServiceServlet</servlet-class>
   </servlet>
   <servlet-mapping>
      <servlet-name>phonegapfileapi</servlet-name>
      <url-pattern>/showcase/phonegapfileapi</url-pattern>
   </servlet-mapping>
   <servlet>
       <servlet-name>SystemServiceServlet</servlet-name>
       <servlet-class>com.google.api.server.spi.SystemServiceServlet</servlet-class>
       <init-param>
          <param-name>services</param-name>
       <param-value/>
     </init-param>
   </servlet>

   <servlet-mapping>
      <servlet-name>SystemServiceServlet</servlet-name>
      <url-pattern>/_ah/spi/*</url-pattern>
   </servlet-mapping>

all jars are in fooApp/war/WEB-INF/lib how could i solve this problem? please help.

3条回答
干净又极端
2楼-- · 2020-03-25 17:48

I'm using maven, but had the same problem. With maven we don't have the SDK version set in project properties, instead we have this plugin:

<plugin>
    <groupId>com.google.appengine</groupId>
    <artifactId>appengine-maven-plugin</artifactId>
    <version>1.8.3</version>

To solve the exception: Window/Show View/Other... > Servers/Server and then right click on the used AppEngine server then click Clean....

Note: this will wipe your local dev datastore, so make a backup of the file if you want to keep your data:

.../workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp${SERVER_NUM}/${DEPLOYED_APP_NAME}/WEB-INF/appengine-generated/local_db.bin

查看更多
萌系小妹纸
3楼-- · 2020-03-25 17:52

I faced this same problem. SystemServiceServlet seems to be needed only if you want to deploy the web admin servlet in jetty.

In my case the issue was the GAE eclipse plugin was using GAE Java SDK 1.6 by default and the package com.google.api.server is no even there. I fixed it by setting the SDK manually to GAE SDK 1.7.

Be careful when changing the SDK, I tried by changing the default SDK but still had this problem until I selected "Use specific SDK" pointing to 1.7.

查看更多
兄弟一词,经得起流年.
4楼-- · 2020-03-25 17:59

Solution in my situation - just kill all javaw.exe *32 process in task manager.

查看更多
登录 后发表回答