Can't get Play! 1.2.2 and GAE SDK 1.5.1 to work?!?

34 views
Skip to first unread message

Samson

unread,
Jul 20, 2011, 11:29:17 AM7/20/11
to play-framework
Hi everyone,

I am new to the play! framework and have been trying to get the
default app loaded into Google App Engine. Here is what I did:

1. play war myApp -o myApp-war (Package into war file)
2. appcfg update myApp-war/ (Upload files GAE)

I have all the config setup in conf files with the following
dependencies in .yml file:
# Application dependencies

require:
- play 1.2.2
- play -> gae 1.4
- play -> siena 2.02

But no matter what I do, I keep getting the following error message:
Uncaught exception from servlet
javax.servlet.UnavailableException: Initialization failed.
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:
211)
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.handleRequest(JavaRuntime.java:
260)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$2.handleRequest(RuntimePb.java:9805)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
422)
at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:
579)
at com.google.tracing.TraceContext$TraceContextRunnable
$1.run(TraceContext.java:449)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:
689)
at com.google.tracing.TraceContext
$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:
327)
at com.google.tracing.TraceContext
$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:
319)
at com.google.tracing.TraceContext
$TraceContextRunnable.run(TraceContext.java:447)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
1110)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)

AND

Uncaught exception from servlet
java.lang.NoClassDefFoundError: java.lang.management.ManagementFactory
is a restricted class. Please see the Google App Engine developer's
guide for more details.
at
com.google.apphosting.runtime.security.shared.stub.java.lang.management.ManagementFactory.<clinit>(ManagementFactory.java)
at
com.mchange.v2.c3p0.management.ActiveManagementCoordinator.<init>(ActiveManagementCoordinator.java:
42)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at com.mchange.v2.c3p0.C3P0Registry.<clinit>(C3P0Registry.java:134)
at
com.mchange.v2.c3p0.impl.PoolBackedDataSourceBase.<init>(PoolBackedDataSourceBase.java:
228)
at
com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.<init>(AbstractPoolBackedDataSource.java:
62)
at
com.mchange.v2.c3p0.ComboPooledDataSource.<init>(ComboPooledDataSource.java:
109)
at
com.mchange.v2.c3p0.ComboPooledDataSource.<init>(ComboPooledDataSource.java:
105)
at play.db.DBPlugin.onApplicationStart(DBPlugin.java:97)
at
play.plugins.PluginCollection.onApplicationStart(PluginCollection.java:
425)
at play.Play.start(Play.java:492)
at play.Play.init(Play.java:292)
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.handleRequest(JavaRuntime.java:
260)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$2.handleRequest(RuntimePb.java:9805)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
422)
at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:
579)
at com.google.tracing.TraceContext$TraceContextRunnable
$1.run(TraceContext.java:449)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:
689)
at com.google.tracing.TraceContext
$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:
327)
at com.google.tracing.TraceContext
$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:
319)
at com.google.tracing.TraceContext
$TraceContextRunnable.run(TraceContext.java:447)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
1110)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)

Please help! Thanks so much in advance.

Raphael André Bauer

unread,
Jul 20, 2011, 12:58:41 PM7/20/11
to play-fr...@googlegroups.com
does your setup run locally via play run?

otherwise check the following:
- deploy via play gae:deploy (not with war + appcfg update)
- check that you got a siena.properties in the package of your model
classes configured with your app engine specifics.
- make sure you got a appengine-web.xml

I can confirm that it runs for me (I am using gae sdk 1.5.0)...


Best,

Raphael

> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>

--
inc: http://ars-machina.raphaelbauer.com
tech: http://ars-codia.raphaelbauer.com
web: http://raphaelbauer.com

Nicolas Girardin

unread,
Jul 29, 2011, 5:10:31 PM7/29/11
to play-fr...@googlegroups.com
You should try

play gae:deploy --gae=/path/to/appenginesdk

Nicolas :)

Pascal Voitot Dev

unread,
Jul 29, 2011, 7:10:00 PM7/29/11
to play-fr...@googlegroups.com

Hi
Just to add my words on top of those already good advices!
The siena.properties is not required in play as siena plugin deals with its config directly!
Do not  create the war and  do not use appcfg!
Be careful not to activate any jpa sql org db config anywhere because play will try to initialize classes refused by gae!
Anyway it should work easy so don't think it's hard!

Br
Pascal

Reply all
Reply to author
Forward
0 new messages