2009-09-14 03:55:04.869::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2009-09-14 03:55:04.957::INFO: jetty-6.1.x 2009-09-14 03:55:04.159::WARN: failed _ah_StaticFileFilter java.lang.ClassCastException: com.google.apphosting.utils.jetty.AppEngineWebAppContext$AppEngineServletContext cannot be cast to org.mortbay.jetty.handler.ContextHandler$SContext at com.google.appengine.tools.development.StaticFileFilter.init(StaticFileFilter.java:47) at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589) at org.mortbay.jetty.servlet.Context.startContext(Context.java:139) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) at org.mortbay.jetty.Server.doStart(Server.java:217) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:152) at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:116) at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:218) at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:162) at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48) at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:113) at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89) 2009-09-14 03:55:04.160::WARN: Failed startup of context com.google.apphosting.utils.jetty.DevAppEngineWebAppContext@1d8d237{/,xxx\war} java.lang.ClassCastException: com.google.apphosting.utils.jetty.AppEngineWebAppContext$AppEngineServletContext cannot be cast to org.mortbay.jetty.handler.ContextHandler$SContext at com.google.appengine.tools.development.StaticFileFilter.init(StaticFileFilter.java:47) at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589) at org.mortbay.jetty.servlet.Context.startContext(Context.java:139) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) at org.mortbay.jetty.Server.doStart(Server.java:217) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:152) at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:116) at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:218) at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:162) at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48) at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:113) at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89) 2009-09-14 03:55:04.178::INFO: Started SelectChannelConnector@127.0.0.1:8080 The server is running at http://localhost:8080/あれ?と思いサーチしたら、なんとwar/WEB-INF/libの下にappengine-local-runtime.jarを配置しているとjettyの起動に失敗するらしい。
参考:I broke something using Eclipse plugin - Google App Engine for Java | Google グループ
ユニットテストがやりたくて、必要なjarをプロジェクト下に配置した。適当にWEB-INF/libの下に配置したが、それが問題だったのだorz。
よって、appengine-local-runtime.jarとappengine-api-stubs.jarをWEB-INF/lib下から削除し、別途WEB-INF/にjunitlibsというフォルダを作成。そのフォルダ下にappengine-local-runtime.jarとappengine-api-stubs.jarを配置した。また、ビルドパスもその場所へ設定を変更した。
そうすると
The following classpath entry 'xxx\war\WEB-INF\junitlibs\appengine-api-stubs.jar' will not be available on the server's classpath
The following classpath entry 'xxx\war\WEB-INF\junitlibs\appengine-local-runtime.jar' will not be available on the server's classpath
Eclipseの警告が2行でますが、ムシ(^^)。
appengine-api-stubs.jarは今回の問題に関係はないのですが、ユニットテストのために追加したjar2つをまとめておきたいので、appengine-local-runtime.jarと同じ場所に管理しました。
通りすがりですが、助かりました。
返信削除