Google Glass快速入门Java HTTP错误503错误Service_Unavailable

时间:2013-08-20 22:32:19

标签: google-app-engine google-mirror-api google-glass

每当我尝试在localhost:8080上运行java镜像快速启动主机时,我就会得到。

            HTTP ERROR: 503
            Problem accessing /. Reason:
            SERVICE_UNAVAILABLE
            Powered by Jetty://

我正在使用mav jetty:在命令行中运行。 我不知道我哪里出错了。我担心解决方案正在打击我,我无法看到它。

任何帮助将不胜感激,提前谢谢。

 Scanning for projects...

 ----------------------------------------------------------------------
 Building glass-java-starter 0.1-SNAPSHOT
 ----------------------------------------------------------------------

 >>> maven-jetty-plugin:6.1.26:run (default-cli) @ glass-java-starter >

 --- maven-resources-plugin:2.6:resources (default-resources) @ glass-j
er ---
 Using 'UTF-8' encoding to copy filtered resources.
 Copying 1 resource

 --- maven-compiler-plugin:3.1:compile (default-compile) @ glass-java-s
-
 Nothing to compile - all classes are up to date

 --- maven-resources-plugin:2.6:testResources (default-testResources) @
va-starter ---
 Using 'UTF-8' encoding to copy filtered resources.
 skip non existing resourceDirectory C:\mirror-quickstart-java-master\s
esources

 --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ glas
arter ---
 No sources to compile

 <<< maven-jetty-plugin:6.1.26:run (default-cli) @ glass-java-starter <

 --- maven-jetty-plugin:6.1.26:run (default-cli) @ glass-java-starter -
 Configuring Jetty for project: glass-java-starter
 Webapp source directory = C:\mirror-quickstart-java-master\src\main\we

 Reload Mechanic: automatic
 Classes = C:\mirror-quickstart-java-master\target\classes
 Logging to org.slf4j.impl.SimpleLogger(org.mortbay.log) via org.mortba
4jLog
 Context path = /
 Tmp directory =  determined at runtime
 Web defaults = org/mortbay/jetty/webapp/webdefault.xml
 Web overrides =  none
 web.xml file = C:\mirror-quickstart-java-master\src\main\webapp\WEB-IN

 Webapp directory = C:\mirror-quickstart-java-master\src\main\webapp
 Starting jetty 6.1.26 ...
 jetty-6.1.26
NG] Failed startup of context org.mortbay.jetty.plugin.Jetty6PluginWebA
@6d9ef759{/,C:\mirror-quickstart-java-master\src\main\webapp}
ang.ClassNotFoundException: com.google.glassware.SignOutServlet
  at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadCla
rstStrategy.java:50)
  at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRe
244)
  at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRe
230)
  at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLo
:401)
  at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLo
:363)
  at org.mortbay.jetty.handler.ContextHandler.loadClass(ContextHandler.
)
  at org.mortbay.jetty.plugin.Jetty6MavenConfiguration.parseAnnotations
venConfiguration.java:141)
  at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configure(Abst
guration.java:119)
  at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXm
ation.java:180)
  at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configureWebAp
tConfiguration.java:96)
  at org.mortbay.jetty.plus.webapp.Configuration.configureWebApp(Config
ava:149)
  at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.
)
  at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.ja

  at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:

  at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6P
ppContext.java:115)
  at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.ja

  at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollect
152)
  at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(Context
llection.java:156)
  at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.ja

  at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollect
152)
  at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.ja

  at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.ja

  at org.mortbay.jetty.Server.doStart(Server.java:224)
  at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.ja

  at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServ
32)
  at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJett
a:454)
  at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMo
96)
  at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJett
java:210)
  at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:

  at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Defa
luginManager.java:106)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecu
208)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecu
153)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecu
145)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildPr
ecycleModuleBuilder.java:84)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildPr
ecycleModuleBuilder.java:59)
  at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreade
fecycleStarter.java:183)
  at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifec
er.java:161)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:318)
  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
  at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
  at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
  at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm
7)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc
l.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(L
ava:290)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.

  at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
.java:414)
  at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.ja

 Started SelectChannelConnector@0.0.0.0:8080
 Started Jetty Server

1 个答案:

答案 0 :(得分:1)

看起来Web应用程序无法找到声明的servlet SignOutServlet。

此servlet已被删除a few commits back,看起来您的web.xml文件与可用来源不同步。您有几种方法可以解决此问题:

  1. 制作新的克隆/下载最新版Java quick start的zip文件(这可能是最简单的解决方案)
  2. src/main/webapp/WEB-INF/web.xml中删除对{8}的所有对SignOutServlet的引用。

      <url-pattern>/attachmentproxy</url-pattern>
    </servlet-mapping>
    
    <!-- remove stuff below here -->
    <servlet>
      <servlet-name>signout</servlet-name>
      <servlet-class>com.google.glassware.SignOutServlet</servlet-class>
    </servlet>
    <servlet-mapping>
      <servlet-name>signout</servlet-name>
      <url-pattern>/signout</url-pattern>
    </servlet-mapping>
    <!-- remove stuff above here -->
    
    
    <welcome-file-list>
      <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    
  3. 一旦删除了这些依赖项,请在构建好的度量之前进行清理:

    $ mvn clean jetty:run