playframework 1.2示例应用程序在部署到google-appengine时抛出505

时间:2012-06-06 22:23:57

标签: google-app-engine playframework

我在playframework 1.2中创建了一个示例应用程序,并尝试将其部署到google-appengine,部署显示没有问题。但是当我点击我的应用程序时,它显示505错误。

当我检查日志时,我发现它抛出一个错误,然后进入有趣的部分,它显示了一个servlet异常,呵呵! play完全脱离了servlet / jsp世界。怎么会抛出servlet异常?

完整堆栈跟踪

  

无法实例化侦听器play.server.ServletWrapper   java.lang.ClassNotFoundException:play.server.ServletWrapper at   com.google.appengine.runtime.Request.process-b8b4d374cb7c1344(Request.java)     在java.lang.ClassLoader.loadClass(ClassLoader.java:266)at   org.mortbay.jetty.handler.ContextHandler.loadClass(ContextHandler.java:1101)     在   org.mortbay.jetty.webapp.WebXmlConfiguration.initListener(WebXmlConfiguration.java:630)     在   org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(WebXmlConfiguration.java:368)     在   org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(WebXmlConfiguration.java:289)     在   org.mortbay.jetty.webapp.WebXmlConfiguration.configure(WebXmlConfiguration.java:222)     在   org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:180)     在   org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1247)     在   org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)     在   org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)     在   org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)     在   com.google.tracing.TraceContext $ TraceContextRunnable.runInContext(TraceContext.java:449)     在   com.google.tracing.TraceContext $ TraceContextRunnable $ 1.run(TraceContext.java:455)     在   com.google.tracing.TraceContext.runInContext(TraceContext.java:695)     在   com.google.tracing.TraceContext $ AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)     在   com.google.tracing.TraceContext $ AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)     在   com.google.tracing.TraceContext $ TraceContextRunnable.run(TraceContext.java:453)     在java.lang.Thread.run(Thread.java:679)

     

W 2012-06-06 14:32:23.044

     

EXCEPTION java.lang.ClassNotFoundException:   play.server.ServletWrapper at   com.google.appengine.runtime.Request.process-b8b4d374cb7c1344(Request.java)     在java.lang.ClassLoader.loadClass(ClassLoader.java:266)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 at   org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:242)     在   org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)     在   org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)     在org.mortbay.jetty.servlet.Context.startContext(Context.java:140)     在   org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)     在   org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)     在   org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)     在   org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)     在   com.google.tracing.TraceContext $ TraceContextRunnable.runInContext(TraceContext.java:449)     在   com.google.tracing.TraceContext $ TraceContextRunnable $ 1.run(TraceContext.java:455)     在   com.google.tracing.TraceContext.runInContext(TraceContext.java:695)     在   com.google.tracing.TraceContext $ AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)     在   com.google.tracing.TraceContext $ AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)     在   com.google.tracing.TraceContext $ TraceContextRunnable.run(TraceContext.java:453)     在java.lang.Thread.run(Thread.java:679)

     

E 2012-06-06 14:32:23.045

     

javax.servlet.ServletContext日志:不可用   javax.servlet.UnavailableException:play.server.ServletWrapper at   org.mortbay.jetty.servlet.Holder.doStart(Holder.java:79)at   org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:242)     在   org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)     在   org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)     在org.mortbay.jetty.servlet.Context.startContext(Context.java:140)     在   org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)     在   org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)     在   org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)     在   org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)     在   com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:202)     在   com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:171)     在   com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:123)     在   com.google.apphosting.runtime.JavaRuntime $ RequestRunnable.run(JavaRuntime.java:477)     在   com.google.tracing.TraceContext $ TraceContextRunnable.runInContext(TraceContext.java:449)     在   com.google.tracing.TraceContext $ TraceContextRunnable $ 1.run(TraceContext.java:455)     在   com.google.tracing.TraceContext.runInContext(TraceContext.java:695)     在   com.google.tracing.TraceContext $ AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)     在   com.google.tracing.TraceContext $ AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)     在   com.google.tracing.TraceContext $ TraceContextRunnable.run(TraceContext.java:453)     在   com.google.apphosting.runtime.ThreadGroupPool $ PoolEntry.run(ThreadGroupPool.java:251)     在java.lang.Thread.run(Thread.java:679)

     

W 2012-06-06 14:32:23.092

     

上下文启动失败   com.google.apphosting.utils.jetty.RuntimeAppEngineWebAppContext@15e00b7 {/,/基/数据/家/应用/秒〜播放GAE2 / 1.359439975758049816}   java.lang.NullPointerException at   java.lang.Class.isAssignableFrom(Native Method)at   org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256)     在   org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)     在   org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)     在org.mortbay.jetty.servlet.Context.startContext(Context.java:140)     在   org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)     在   org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)     在   org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)     在   org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)     在   com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:202)     在   com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:171)     在   com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:123)     在   com.google.apphosting.runtime.JavaRuntime $ RequestRunnable.run(JavaRuntime.java:477)     在   com.google.tracing.TraceContext $ TraceContextRunnable.runInContext(TraceContext.java:449)     在   com.google.tracing.TraceContext $ TraceContextRunnable $ 1.run(TraceContext.java:455)     在   com.google.tracing.TraceContext.runInContext(TraceContext.java:695)     在   com.google.tracing.TraceContext $ AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)     在   com.google.tracing.TraceContext $ AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)     在   com.google.tracing.TraceContext $ TraceContextRunnable.run(TraceContext.java:453)     在   com.google.apphosting.runtime.ThreadGroupPool $ PoolEntry.run(ThreadGroupPool.java:251)     在java.lang.Thread.run(Thread.java:679)

     

C 2012-06-06 14:32:23.093

     

来自servlet的未捕获异常javax.servlet.UnavailableException:   初始化失败。在   com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:211)     在   com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:171)     在   com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:123)     在   com.google.apphosting.runtime.JavaRuntime $ RequestRunnable.run(JavaRuntime.java:477)     在   com.google.tracing.TraceContext $ TraceContextRunnable.runInContext(TraceContext.java:449)     在   com.google.tracing.TraceContext $ TraceContextRunnable $ 1.run(TraceContext.java:455)     在   com.google.tracing.TraceContext.runInContext(TraceContext.java:695)     在   com.google.tracing.TraceContext $ AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)     在   com.google.tracing.TraceContext $ AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)     在   com.google.tracing.TraceContext $ TraceContextRunnable.run(TraceContext.java:453)     在   com.google.apphosting.runtime.ThreadGroupPool $ PoolEntry.run(ThreadGroupPool.java:251)     在java.lang.Thread.run(Thread.java:679)

1 个答案:

答案 0 :(得分:0)

虽然Play不使用Servlet,但为了使Play工作在J2EE容器(包括GAE)中,play使用Servlet包装器将来自J2EE容器的请求路由到Play代码。

从您获得的异常开始,看起来这个Play servlet包装器不可用。您是否在Play中使用GAE模块进行部署?这应创建一个WAR文件并将其直接上传到GAE。这应确保正确复制所需的所有内容。