开发者

Scalate and GAE Options org.fusesource.scalate.TemplateException: Unable to create temporary file

I am trying to run Scala/Scalate on Google app engine. I wanted to test the project so i am running the GAE locally its deployed successfully and when i try to call the main url i am getting following exception

org.fusesource.scalate.TemplateException: Unable to create temporary file at org.fusesource.scalate.TemplateEngine.compileAndLoad(TemplateEngine.scala: 739) at org.fusesource.scalate.TemplateEngine.compileAndLoadEntry(TemplateEngine.sc ala: 595) at org.fusesource.scalate.TemplateEngine.liftedTree1$1(TemplateEngine.scala: 327) at org.fusesource.scalate.TemplateEngine.load(TemplateEngine.scala:321) at org.fusesource.scalate.TemplateEngine.load(TemplateEngine.scala:391) at org.scalatra.scalate.ScalateSupport $class.renderErrorPage(ScalateSupport.scala:56) at MyScalatraFilter.renderErrorPage(MyScalatraFilter.scala:5) at org.scalatra.scalate.ScalateSupport $class.handleError(ScalateSupport.scala:51) at MyScalatraFilter.handleError(MyScalatraFilter.scala:5) at org.scalatra.ScalatraKernel$$anonfun$handle$1$$anonfun$apply $mcV$sp$1$$anonfun$apply$mcV$sp$2.apply$mcV$sp(ScalatraKernel.scala: 140) at org.scalatra.ScalatraKernel$$anonfun$handle$1$$anonfun$apply $mcV$sp$1$$anonfun$apply$mcV$sp$2.apply(ScalatraKernel.scala:134) at org.scalatra.ScalatraKernel$$anonfun$handle$1$$anonfun$apply $mcV$sp$1$$anonfun$apply$mcV$sp$2.apply(ScalatraKernel.scala:134) at scala.util.DynamicVariable.withValue(DynamicVariable.scala: 71) at org.scalatra.ScalatraKernel$$anonfun$handle$1$$anonfun$apply $mcV$sp$1.apply$mcV$sp(ScalatraKernel.scala:134) at org.scalatra.ScalatraKernel$$anonfun$handle$1$$anonfun$apply $mcV$sp$1.apply(ScalatraKernel.scala:134) at org.scalatra.ScalatraKernel$$anonfun$handle$1$$anonfun$apply $mcV$sp$1.apply(ScalatraKernel.scala:134) at scala.util.DynamicVariable.withValue(DynamicVariable.scala: 71) at org.scalatra.ScalatraKernel$$anonfun$handle$1.apply$mcV $sp(ScalatraKernel.scala:133) at org.scalatra.ScalatraKernel$$anonfun$handle $1.apply(ScalatraKernel.scala:133) at org.scalatra.ScalatraKernel$$anonfun$handle $1.apply(ScalatraKernel.scala:133) at scala.util.DynamicVariable.withValue(DynamicVariable.scala: 71) at org.scalatra.ScalatraKernel $class.handle(ScalatraKernel.scala:132) at MyScalatraFilter.handle(MyScalatraFilter.scala:5) at org.scalatra.ScalatraFilter$$anonfun$doFilter$1.apply$mcV $sp(ScalatraFilter.scala:18) at org.scalatra.ScalatraFilter$$anonfun$doFilter $1.apply(ScalatraFilter.scala:18) at org.scalatra.ScalatraFilter$$anonfun$doFilter $1.apply(ScalatraFilter.scala:18) at scala.util.DynamicVariable.withValue(DynamicVariable.scala: 71) at org.scalatra.ScalatraFilter $class.doFilter(ScalatraFilter.scala:17) at MyScalatraFilter.doFilter(MyScalatraFilter.scala:5) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(He aderVerificationFilter.java: 35) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi lter.java: 58) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans actionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile Filter.java: 12开发者_如何学C2) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.BackendServersFilter.doFilter(Backen dServersFilter.java: 97) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEn gineWebAppContext.java: 70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:351) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 542) at org.mortbay.jetty.HttpConnection $RequestHandler.headerComplete(HttpConnection.java:923) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)

    at

org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java: 212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java: 404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 409) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:582) Caused by: java.lang.SecurityException: Unable to create temporary file at java.io.File.checkAndCreate(File.java:1701) at java.io.File.createTempFile(File.java:1792) at java.io.File.createTempFile(File.java:1828) at org.fusesource.scalate.TemplateEngine.workingDirectory(TemplateEngine.scala : 200) at org.fusesource.scalate.TemplateEngine.sourceDirectory(TemplateEngine.scala: 156) at org.fusesource.scalate.TemplateEngine.sourceFileName(TemplateEngine.scala: 612) at org.fusesource.scalate.TemplateEngine.compileAndLoad(TemplateEngine.scala: 650) ... 56 more Aug 19, 2011 3:45:16 PM com.google.appengine.tools.development.LocalResourceFileServlet doGet WARNING: No file found for: /favicon.ico

Anyone help me on this issues ?


GAE has some multithreading restrictions, scalate user guide has notes about GAE with link to example project, link to guide


To be more specific you need to precompile your templates, as the documentation specifies.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜