2013-08-20 103 views
0

每當我嘗試在localhost:8080上運行java鏡像快速啓動主機時,我正在接受。Google Glass快速入門Java HTTP錯誤503錯誤Service_Unavailable

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

我正在使用mav碼頭:在命令行中運行。 我不知道我出錯的地方。我害怕解決方案將我擊中在臉上,我看不到它。

任何幫助將不勝感激提前。

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 [email protected]:8080 
Started Jetty Server 

回答

1

它看起來像web應用程序無法找到一個聲明的servlet SignOutServlet。

此servlet被刪除a few commits back,它看起來像您的web.xml文件與可用的源不同步。你有幾個選項來解決此問題:

  1. 創建一個新的克隆/下載的Java quick start的最新版本的壓縮文件(這可能是最簡單的解決方案)
  2. 刪除對SignOutServlet所有引用如在this commit中那樣從src/main/webapp/WEB-INF/web.xml

    <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> 
    

一旦你刪除這些依賴關係,你建立良好的措施之前,做一個乾淨的:

$ mvn clean jetty:run 
+0

我確信從web.xml中刪除SignOutServlet和我做了mvn clean依賴:複製依賴包,現在它正在工作。謝謝珍妮。我希望我能夠得到這個答案,但我沒有足夠的分數。 – Rick