guillaumebort / play-gae Goto Github PK
View Code? Open in Web Editor NEWCreate play application for Google App Engine
Home Page: http://www.playframework.org/modules/gae
Create play application for Google App Engine
Home Page: http://www.playframework.org/modules/gae
Would be great to have this updated to 1.2.3.
It works fine with the last 1.1 version and GAE 1.5.3
Failed startup of context com.google.apphosting.utils.jetty.RuntimeAppEngineWebAppContext@143724e{/,/base/data/home/apps/sXXXXXXXX/2.353761633528685203}
java.lang.SecurityException: SHA1 digest error for org/eclipse/jdt/internal/compiler/env/INameEnvironment.class
at com.google.appengine.runtime.Request.process-0000000000000000(Request.java)
at sun.security.util.ManifestEntryVerifier.verify(ManifestEntryVerifier.java:210)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:218)
at java.util.jar.JarVerifier.update(JarVerifier.java:205)
at java.util.jar.JarVerifier$VerifierStream.read(JarVerifier.java:428)
at sun.misc.Resource.getBytes(Resource.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:273)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at play.classloading.ApplicationClasses.<init>(ApplicationClasses.java:29)
at play.Play.init(Play.java:201)
at play.server.ServletWrapper.contextInitialized(ServletWrapper.java:75)
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.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 java.lang.Thread.run(Thread.java:679)
One simple patch I made to the commands.py was to set the gae_path to the os.getenv("GAE_HOME") to avoid having to specify this all the time. The reason was because my appengine home is located somewhere deep in my eclipse path which I would like to avoid having to constantly specify.
Introduced in Issue #32
Would be nice if the current exclude list could be overwritten without having to patch the module.
line 28 in commands.py says
if not os.path.exists(os.path.join(gae_path, 'bin/appcfg.sh')):
and line 71 says
os.system('%s/bin/appcfg.sh update %s' % (gae_path, war_path))
These need to check for the platform and run bin/appcfg.cmd if on windows
if sys.platform == 'win32'
etc.
I just wrote a mail handler for my GAE application, which worked quite well, but was difficult to debug since the function is not available in the dev server.
The python gae development server has a function to send test emails to the server running locally, when you call localhost:port/_ah/admin/ you can create a sample email to test the handler.
I'm not sure if a similar admin function is available in the java version of gae as well, if it is, it would be nice if the admin pages could be exposed as a route in play, if not, it would be possible to write a mail test function that creates a sample email and post it to the handler directly (in fact I could write that if you like)
When the GAE plugin is used in combination with the Scala plugin, Caching doesn't make use of the Memcache service of Google.
The scheduler gets an error trying to hit an internal URL:
[exec] 17:15:50,927 INFO ~ Web hook at http://localhost:9000/_ah/queue/__deferred__ returned status code 404. Rescheduling...
What are the possible causes of this error ?
play.Logger error: Module secure will not be loaded because /base/data/home/apps/ssmth/1.141895702394054553/WEB-INF/modules/secure does not existsmth/1.141895702394054553/WEB-INF/modules/siena-2.0.2 does not exist
play.Logger error: Module siena will not be loaded because /base/data/home/apps/s
play.Logger error: Module gae will not be loaded because /base/data/home/apps/s~smth/1.141895702394054553/WEB-INF/modules/gae-1.4 does not exist
module.secure=${play.path}/modules/secure
module.siena=${play.path}/modules/siena-2.0.2
module.gae=${play.path}/modules/gae-1.4
Hi, I'm trying to deploy a play app via your pluging but I'm getting connection timeouts.
Via the google eclipse plugin I am able to deploy a sample web app, so it's not firewall.
Hello,
As the tmp folder is cleared for each deploy to GAE, the datastore file is removed too. Can it be moved to another location? It's a little annoying to loose test data each time.
evrything is in the title
the new ifAdmin.tag is :
%{
if(play.modules.gae.GAE.userService.userLoggedIn) {
if(play.modules.gae.GAE.userService.userAdmin) {
play.templates.TagContext.parent().data.put("_executeNextElse", false);
%}
#{doBody /}
%{
} else {
play.templates.TagContext.parent().data.put("_executeNextElse", true);
}
}
}%
new code should be :
%{
if(play.modules.gae.GAE.userService.userLoggedIn) {
if(play.modules.gae.GAE.userService.userAdmin) {
play.templates.TagContext.parent().data.put("_executeNextElse", false);
%}
#{doBody /}
%{
} else {
play.templates.TagContext.parent().data.put("_executeNextElse", true);
}
}
}%
One of the more useful appcfg commands is not present in the module. Current workaround is find the war file (usually in /tmp/appid.war ) and issue appcfg.sh rollback /tmp/appid.war )
My web application uses sessions. When some time passed without requests and make a new request, I get the following error:
"Oops, an error occured
This exception has been logged with id 65fik4el1."
There is not problem when the petitions are continued.
Remove the un-needed play.modules.gae.WS - it is integrated into Play 1.2.4 and there are problems in the code.
I created one blank war with play and module gae. I follow all indications and in server throw next error:
05-15 01:14PM 06.660
[nombreAplicacion/1.341944538328109457].: 20:14:06,659 ERROR
~
@62fokn1ao
Internal Server Error (500)
Oops: NoClassDefFoundError
An unexpected error occured caused by exception NoClassDefFoundError:
java.io.FileOutputStream is a restricted class. Please see the Google
App Engine developer's guide for more details.
play.exceptions.UnexpectedException: Unexpected Error
at play.Invoker$Invocation.onException(Invoker.java:142)
at play.Invoker$Invocation.run(Invoker.java:182)
at play.server.ServletWrapper
$ServletInvocation.run(ServletWrapper.java:463)
at play.Invoker.invokeInThread(Invoker.java:59)
at play.server.ServletWrapper.service(ServletWrapper.java:112)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:
97)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:
35)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
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.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
238)
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
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
135)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
250)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5838)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5836)
at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:
24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
398)
at com.google.net.rpc.impl.Server$2.run(Server.java:852)
at
com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:
56)
at
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:
576)
at com.google.net.rpc.impl.Server.startRpc(Server.java:807)
at com.google.net.rpc.impl.Server.processRequest(Server.java:369)
at
com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:
442)
at
com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:
319)
at
com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:
290)
at com.google.net.async.Connection.handleReadEvent(Connection.java:
474)
at
com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:
831)
at
com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:
207)
at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
103)
at
com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:
251)
at com.google.apphosting.runtime.JavaRuntime
$RpcRunnable.run(JavaRuntime.java:413)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: java.io.FileOutputStream 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.io.FileOutputStream.(FileOutputStream.java)
at play.classloading.BytecodeCache.cacheBytecode(BytecodeCache.java:
88)
at
play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:
127)
at
play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:
376)
at play.Play.start(Play.java:374)
at play.Play.detectChanges(Play.java:479)
at play.Invoker$Invocation.init(Invoker.java:98)
at play.Invoker$DirectInvocation.init(Invoker.java:199)
at play.Invoker$Invocation.run(Invoker.java:174)
... 45 more
I 05-15 01:14PM 06.665
[nombreAplicacion/1.341944538328109457].: 20:14:06,665 ERROR ~
Error during the 500 response generation
java.lang.NoClassDefFoundError: Could not initialize class
com.google.apphosting.runtime.security.shared.stub.java.io.FileOutputStream
at play.classloading.BytecodeCache.cacheBytecode(BytecodeCache.java:
88)
at play.templates.Template.compile(Template.java:174)
at play.templates.Template.render(Template.java:214)
at play.server.ServletWrapper.serve500(ServletWrapper.java:360)
at play.server.ServletWrapper
$ServletInvocation.run(ServletWrapper.java:465)
at play.Invoker.invokeInThread(Invoker.java:59)
at play.server.ServletWrapper.service(ServletWrapper.java:112)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:
97)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:
35)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
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.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
238)
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
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
135)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
250)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5838)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5836)
at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:
24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
398)
at com.google.net.rpc.impl.Server$2.run(Server.java:852)
at
com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:
56)
at
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:
576)
at com.google.net.rpc.impl.Server.startRpc(Server.java:807)
at com.google.net.rpc.impl.Server.processRequest(Server.java:369)
at
com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:
442)
at
com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:
319)
at
com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:
290)
at com.google.net.async.Connection.handleReadEvent(Connection.java:
474)
at
com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:
831)
at
com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:
207)
at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
103)
at
com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:
251)
at com.google.apphosting.runtime.JavaRuntime
$RpcRunnable.run(JavaRuntime.java:413)
at java.lang.Thread.run(Unknown Source)
W 05-15 01:14PM 06.668
/
java.lang.RuntimeException: java.lang.NoClassDefFoundError: Could not
initialize class
com.google.apphosting.runtime.security.shared.stub.java.io.FileOutputStream
at play.server.ServletWrapper.serve500(ServletWrapper.java:372)
at play.server.ServletWrapper
$ServletInvocation.run(ServletWrapper.java:465)
at play.Invoker.invokeInThread(Invoker.java:59)
at play.server.ServletWrapper.service(ServletWrapper.java:112)
at
...
More information in http://groups.google.com/group/play-framework/browse_thread/thread/e56724577c4dec76
Thank you in advance,
Regards,
GAE 1.7 was just released. Will there be an update to support it?
Framework version: play 1.1rc3
Platform you're using: windows xp java 1.6.0-22
Reproduction steps:
when the java command fails in the gae plugin, the packaging process still continues since the return code is not checked
(probably a minor issue, I noticed this when checking out the problem I previously reported as #9)
Framework version: play 1.1rc3, gae-head
Platform you're using: windows xp, java 1.6.0-22
Reproduction steps:
I spent a while trying to track down an error 500 on GAE, which in the end was an option I had still in the conf file for a normal database integration (db=mem).
This means that play tries to initialize a database which causes a security error on google, but it works in dev mode since there is no security restriction.
I think it would be better to have deploy or even the run command fail when the combination of features doesn't make sense or will not work.
Something similar happened before when I had an @entity annotation still in the model code, this caused JPA exception, a combination that also doesn't make sense I assume (that was much easier to find since it also happened in DEV mode, but it would also be better to get a warning or an error in that case that explains that the options do not fit together).
These jars should be added to the Exclude list. (I'm guessing perhaps it is because I'm using an earlier version of eg GAE 1.5.x)
I changed line 96 of commands.py to this and it worked.
'appengine-api-labs','appengine-remote-api.jar','appengine-tools-api.jar'
EDIT: The correct fix is to copy the GAE jar files from the same version of GAE that you are using.
It should be possible to modify web.xml after gae:package. This should really be an option in gae:package or a feature defined in application.conf.
I will look into implementing this.
#24 has a workaround involving more steps.
I use backend instances in my project and it is a very cool feature to improve this module. I've already implemented this, changing 'commands.py'. The solution is below.
File: commands.py
Changes:
Put the commands in the array COMMANDS, line 18:
COMMANDS = ["gae:deploy", "gae:package", "gae:update_indexes", "gae:vacuum_indexes", "gae:update_queues", "gae:update_dos", "gae:update_cron", "gae:cron_info", "gae:update_backend", "gae:backend_info", "gae:request_logs"]
Put the explanations of the new commands in the array HELP, line 19:
HELP = {
'gae:deploy': "Deploy to Google App Engine",
'gae:update_indexes': "Updating Indexes",
'gae:vacuum_indexes': "Deleting Unused Indexes",
'gae:update_queues': "Managing Task Queues",
'gae:update_dos': "Managing DoS Protection",
'gae:update_cron': "Managing Scheduled Tasks : upload cron job specifications",
'gae:cron_info': "Managing Scheduled Tasks : verify your cron configuration",
'gae:update_backend': "Managing Backend Instances : update your backend configuration",
'gae:backend_info': "Managing Backend Instances : verify your backend configuration",
'gae:request_logs': "Download logs from Google App Engine",
}
Insert the following code in the end of the file (inside 'def execute(**kargs)'):
if command == "gae:update_backend":
print '' Updating backend specifications'
print '
print '~ ---------'
if os.name == 'nt':
os.system('%s/bin/appcfg.cmd backends update %s' % (gae_path, war_path))
else:
os.system('%s/bin/appcfg.sh backends update %s' % (gae_path, war_path))
print "~ "
print "~ Done!"
print "~ "
sys.exit(-1)
if command == "gae:backend_info":
print '~'
print '~ Listing backend specifications'
print '~ ---------'
if os.name == 'nt':
os.system('%s/bin/appcfg.cmd backends list %s' % (gae_path, war_path))
else:
os.system('%s/bin/appcfg.sh backends list %s' % (gae_path, war_path))
print "~ "
print "~ Done!"
print "~ "
sys.exit(-1)
Please add 1.6 support
This is a Play bug but it effects GAE users. Parts of WSUrlFetch are commented out (not implemented) so it is not possible to attach a file to post/put request.
I have a workaround using HttpClient that runs on GAE using a modified Connection manager. I will post this code shortly but it would be nice to integrate it so it implements the WS interface.
I would like to know if it is possible to enable Google App Engine's AppStats with Play framework ?
http://googleappengine.blogspot.com/2010/03/easy-performance-profiling-with.html
I don't think it's possible to add create a web.xml file at the moment.
Hi..
im trying to send an html email with gae module. But im getting the following error:
The email has not been sent
Mail error (In /app/controllers/Application.java around line 56)
A mail error occured : Error while sending email
play.exceptions.MailException: Error while sending email
at play.libs.Mail.sendMessage(Mail.java:193)
at play.libs.Mail.send(Mail.java:62)
at controllers.Application.sendEmail(Application.java:56)
at controllers.Application.sendMail(Application.java:24)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:408)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:403)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:176)
at Invocation.HTTP Request(Play!)
Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : null:25
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1242)
at org.apache.commons.mail.Email.send(Email.java:1267)
at play.libs.Mail.sendMessage(Mail.java:191)
... 7 more
Caused by: javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Converting attachment data failed)
at javax.mail.Transport.send(Transport.java:163)
at javax.mail.Transport.send(Transport.java:48)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1232)
... 9 more
Caused by: javax.mail.MessagingException: Converting attachment data failed
at com.google.appengine.api.mail.stdimpl.GMTransport.sendMessage(GMTransport.java:231)
at javax.mail.Transport.send(Transport.java:95)
If i try an normal text email, or an html email without gae module it works perfectly...
it is probably a bug.....
Im using play 1.1 and play-gae module 1.4 and gae-sdk 1.4.0
Upgrade to Appengine 1.5.0
Hi,
I made a mistake and entered the wrong username and password when deploying to google appengine. Now, it is not asking me anymore and as a result, I can't deploy the application to the right account.
Can someone tell me where I can make it ask me for the username and password again?
Thank you for the great tool.
Best,
-- Rodney
I have started using task queues in play-gae.
And they work on appengine but not in dev.
I think I have spotted the problem. Before pull request #39, it worked.
After pull request #39 we have started to use test classes from the sdk to simulate the local environment.
They aren't intented for this purpose, they mock some parts of the sdk so you can embed them in junit tests.
One of the parts mocked is remote task queues, so they don't work now.
I think we should completely avoid the use of testing classes for the gae module, like LocalDatastoreServiceTestConfig and LocalTaskQueueTestConfig.
It's not the way used by the official google plugin to simulate dev, and will generate a lot of problems. I suggest to go with the previous version, with that datastore and task queues are working fine for me.
Please include as much relevant information as possible including the exact framework version you're using and a code snippet that reproduces the problem.
Framework version: play 1.1rc3
Platform you're using: windows xp, java 1.6.0-22
Reproduction steps:
when I execute
play gae:deploy --gae \path
I get a java.lang.NoClassDefFoundError error, when executing
play gae:deploy
without the parameter it works (the path comes from the GAE_PATH)
The path is passed to the java command at the wrong position before the -classpath option
Details:
Output without the option (I have put print java_cmd before it is being run in the python script):
C:\projects\play\testapp>play gae:deploy ~ _ _ ~ _ __ | | __ _ _ _| | ~ | '_ \| |/ _' | || |_| ~ | __/|_|\____|\__ (_) ~ |_| |__/ ~ ~ play! 1.1RC3, http://www.playframework.org ~ C:\javatools\appengine-java-sdk-1.3.8 ~ ~ Compiling ~ --------- ['C:\\Programme\\Java\\jdk1.6.0_21\\bin\\java', '-javaagent:C:\\javatools\\play- 1.1RC3\\framework/play.jar', '-Dprecompile=yes', '-classpath', 'C:\\projects\\pl ay\\testapp\\conf;C:\\javatools\\play-1.1RC3\\framework\\play.jar;C:\\javatools\ ... '-Dplay.id=', 'play.server.Server', ''] 00:34:13,453 INFO ~ Starting C:\projects\play\testapp 00:34:13,468 INFO ~ Module siena is available (C:\javatools\play-1.1RC3\modules \siena-1.3) 00:34:13,468 INFO ~ Module gae is available (C:\javatools\play-1.1RC3\modules\g ae-head)
the log with the path option:
C:\projects\play\testapp>play gae:deploy --gae \javatools\appengine-java-sdk-1.3 .8 ~ _ _ ~ _ __ | | __ _ _ _| | ~ | '_ \| |/ _' | || |_| ~ | __/|_|\____|\__ (_) ~ |_| |__/ ~ ~ play! 1.1RC3, http://www.playframework.org ~ C:\javatools\appengine-java-sdk-1.3.8 ~ ~ Compiling ~ --------- ['C:\\Programme\\Java\\jdk1.6.0_21\\bin\\java', '-javaagent:C:\\javatools\\play- 1.1RC3\\framework/play.jar', '-Dprecompile=yes', '\\javatools\\appengine-java-sd k-1.3.8', '-classpath', 'C:\\projects\\play\\testapp\\conf;C:\\javatools\\play-1 ... cation.path=C:\\projects\\play\\testapp', '-Dplay.id=', 'play.server.Server', '' ] Exception in thread "main" java.lang.NoClassDefFoundError: \javatools\appengine- java-sdk-1/3/8 Caused by: java.lang.ClassNotFoundException: \javatools\appengine-java-sdk-1.3.8 at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) Could not find the main class: \javatools\appengine-java-sdk-1.3.8. Program wil l exit. ~ ~ Packaging
I'm trying to run the sample app list-with-gae but I've had some trouble making it work the way it is supposed to.
After the deployment I can create lists, but as soon as I click on a list I get an error message. The log says:
play.Logger niceThrowable:
@66hafie44
Internal Server Error (500)
Execution exception (In /app/models/List.java around line 39)
DatastoreNeedIndexException occured : no matching index found..
play.exceptions.JavaExecutionException: no matching index found..
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:227)
at play.server.ServletWrapper$ServletInvocation.execute(ServletWrapper.java:534)
at play.Invoker$Invocation.run(Invoker.java:265)
at play.server.ServletWrapper$ServletInvocation.run(ServletWrapper.java:525)
at play.Invoker.invokeInThread(Invoker.java:67)
at play.server.ServletWrapper.service(ServletWrapper.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
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.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238)
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 com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135)
at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:260)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime$2.handleRequest(RuntimePb.java:9669)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:439)
at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:573)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:688)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446)
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)
Caused by: com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching index found..
at com.google.appengine.api.datastore.DatastoreApiHelper.translateError(DatastoreApiHelper.java:42)
at com.google.appengine.api.datastore.DatastoreApiHelper$1.convertException(DatastoreApiHelper.java:98)
at com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:69)
at com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:67)
at com.google.appengine.api.datastore.FutureHelper.getInternal(FutureHelper.java:71)
at com.google.appengine.api.datastore.FutureHelper.quietGet(FutureHelper.java:32)
at com.google.appengine.api.datastore.QueryResultsSourceImpl.loadMoreEntities(QueryResultsSourceImpl.java:69)
at com.google.appengine.api.datastore.QueryResultIteratorImpl.ensureLoaded(QueryResultIteratorImpl.java:169)
at com.google.appengine.api.datastore.QueryResultIteratorImpl.nextList(QueryResultIteratorImpl.java:115)
at com.google.appengine.api.datastore.LazyList.forceResolveToIndex(LazyList.java:107)
at com.google.appengine.api.datastore.LazyList.resolveToIndex(LazyList.java:83)
at com.google.appengine.api.datastore.LazyList.resolveAllData(LazyList.java:53)
at com.google.appengine.api.datastore.LazyList.size(LazyList.java:135)
at siena.gae.GaePersistenceManager.mapEntities(GaePersistenceManager.java:209)
at siena.gae.GaeQuery.map(GaeQuery.java:79)
at siena.gae.GaeQuery.fetch(GaeQuery.java:85)
at models.List.items(List.java:39)
at controllers.Lists.show(Lists.java:34)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:540)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:498)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:474)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:469)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:157)
at play.server.ServletWrapper$ServletInvocation.execute(ServletWrapper.java:534)
at play.Invoker$Invocation.run(Invoker.java:265)
at play.server.ServletWrapper$ServletInvocation.run(ServletWrapper.java:525)
at play.Invoker.invokeInThread(Invoker.java:67)
at play.server.ServletWrapper.service(ServletWrapper.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
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 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.HttpConnection.handle(HttpConnection.java:404)
... 10 more
I'm using play 1.2.1 and I've tried both gae 1.4 (play install gae) and grabbing the latest source and building the module (play build-module ...). I'm using gae:deploy to deploy the app, and I'm using appengine 1.5.0.1.
After some googling it seems that there should be a database xml file describing the indices, but it is not created for me.
Thanks in advance
/Rasmus
Framework version: play 1.1rc3, gae-head
Platform you're using: windows xp, java 1.6.0-22
Reproduction steps:
I forgot to insert my application id in the gae xml file when trying to deploy for the first time, this gives a rather strange error message from google, it would be better if you could check if the app_id is empty and give a simple error message before the deploy process is called.
(copied from lighthouse ticket #366)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.