Hi!
Thanks for your suggestions.
I'm afraid depending on scala 0.9.1_20111028 as Manuel suggested gave
exactly the same result.
I cannot get any combination of recent versions of Play, Scala and GAE
working.
I't works locally but not after uploading to GAE.
I've removed everything specific to my application so I believe it
should
be quite repeatable.
The only thing I've done (using Play 1.2.3) is:
play install scala-0.9.1
play new app --with scala
play install gae-1.6.0_b1
I then added dependencies:
- play -> scala 0.9.1
- play -> gae 1.6.0_b1
play dependencies --sync
play gae:deploy
I get:
play.Logger niceThrowable: Cannot load jar:file:/base/data/home/apps/
s~spryvote/1.356069334296527009/WEB-INF/lib/play-scala.jar!/
play.plugins
java.lang.NullPointerException
at play.scalasupport.ScalaPlugin.<init>(ScalaPlugin.scala:170)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at play.plugins.PluginCollection.loadPlugins(PluginCollection.java:
100)
at play.Play.init(Play.java:286)
Using Play 1.2.4 with GAE 1.6.0_b1, I cannot do the 'play gae:deploy'
at all, I get:
~
~ Packaging
~ ---------
Traceback (most recent call last):
File "/Applications/play/play", line 153, in <module>
status =
cmdloader.commands[play_command].execute(command=play_command,
app=play_app, args=remaining_args, env=play_env, cmdloader=cmdloader)
File "/Applications/play-1.2.4/modules/gae-1.6.0_b1/commands.py",
line 220, in execute
package_as_gae_war(app, env, war_path, None)
File "/Applications/play-1.2.4/modules/gae-1.6.0_b1/commands.py",
line 54, in package_as_gae_war
if isParentOf(app.path, war_path):
File "/Applications/play-1.2.4/framework/pym/play/utils.py", line
38, in isParentOf
relpath = os.path.relpath(path1, path2)
AttributeError: 'module' object has no attribute 'relpath'
Using Play 1.2.3 + gae-1.6.0_b1 + scala-0.9.1, as said, after
uploading to GAE,
and doing a page request for the "Your Scala application is ready!"
default page I get:
play.Logger niceThrowable: Cannot load jar:file:/base/data/home/apps/
s~spryvote/1.356067776970267044/WEB-INF/lib/play-scala.jar!/
play.plugins
java.lang.NullPointerException
at play.scalasupport.ScalaPlugin.<init>(ScalaPlugin.scala:166)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at play.plugins.PluginCollection.loadPlugins(PluginCollection.java:
100)
at play.Play.init(Play.java:286)
at play.server.ServletWrapper.contextInitialized(ServletWrapper.java:
74)
at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:
548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:
202)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:
171)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
123)
at com.google.apphosting.runtime.JavaRuntime
$RequestRunnable.run(JavaRuntime.java:422)
at com.google.tracing.TraceContext
$TraceContextRunnable.runInContext(TraceContext.java:449)
at com.google.tracing.TraceContext$TraceContextRunnable
$1.run(TraceContext.java:455)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:
695)
at com.google.tracing.TraceContext
$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:
333)
at com.google.tracing.TraceContext
$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:
325)
at com.google.tracing.TraceContext
$TraceContextRunnable.run(TraceContext.java:453)
at com.google.apphosting.runtime.ThreadGroupPool
$PoolEntry.run(ThreadGroupPool.java:251)
at java.lang.Thread.run(Thread.java:679)
The same thing happens to me using:
Play 1.2.3 + gae-1.6.0_b1 + scala-0.9.1_20111028.
I should add that I removed a folder from the 0.9.1_20111028 module:
rm -rf modules/scala-0.9.1_20111028/tmp/
It seemed it wouldn't do any harm and the upload would fail if I kept
the folder:
com.google.appengine.tools.admin.HttpIoException: Error posting to
URL:
https://appengine.google.com/api/appversion/deploy?app_id=spryvote&version=1&
400 Bad Request
Exceeded the limit of 1000 for allowable files per directory within
WEB-INF/application/modules/scala-0.9.1_20111028/tmp/classes/play/db/
anorm/
So, the most "recent" combination of Play+GAE+Scala that I can get
working are play-1.2.1, gae-1.4.0, scala-0.9.
This is also expressed in this blog post I found, now a few months
old:
http://d.hatena.ne.jp/k4200/20110807/1312737091
So, if anyone has a working Play+GAE+Scala that is more recent then
mine I would really appreciate feedback!
/ Mats
PS:
The thing I wrote in my initial post about having to add a module,
module.gae, to application.conf was my mistake.
A 'play dependencies --sync' instead of editing application.conf would
have fixed the problem.