I'm posting to report a incompatibility regarding the captcha helper
and gae runtime restricted environement.
The use of awt.Color (maybe the whole awt package) is prohibido.
I haven't checked the source code yet for investigation, but I noticed
the play-imaging and play-simpleCaptcha framework libs pkg, but the
exception is thrown with core play.libs.Captcha class Could one of you
messieurs confirm me the use of those libs regarding the core Captcha
utility class ?
Thx
Stack dump, fyi
play.exceptions.JavaExecutionException: java.awt.Color is a restricted
class. Please see the Google App Engine developer's guide for more
details.
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:229)
at play.server.ServletWrapper
$ServletInvocation.execute(ServletWrapper.java:405)
at play.Invoker$Invocation.run(Invoker.java:176)
at play.server.ServletWrapper
$ServletInvocation.run(ServletWrapper.java:396)
at play.Invoker.invokeInThread(Invoker.java:59)
at play.server.ServletWrapper.service(ServletWrapper.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1093)
at
com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:
97)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1084)
at
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:
35)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1084)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1084)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
360)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
238)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
506)
at org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete(HttpConnection.java:830)
at
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
135)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
235)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5485)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5483)
at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:
24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
363)
at com.google.net.rpc.impl.Server$2.run(Server.java:837)
at
com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:
56)
at
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:
536)
at com.google.net.rpc.impl.Server.startRpc(Server.java:792)
at com.google.net.rpc.impl.Server.processRequest(Server.java:367)
at
com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:
448)
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:
774)
at
com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:
205)
at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
101)
at
com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:
251)
at com.google.apphosting.runtime.JavaRuntime
$RpcRunnable.run(JavaRuntime.java:394)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: java.awt.Color is a
restricted class. Please see the Google App Engine developer's guide
for more details.
at java.awt.Color.<clinit>(Color.java)
at play.libs.Images$Captcha.<init>(Images.java:167)
at play.libs.Images.captcha(Images.java:149)
at play.libs.Images.captcha(Images.java:156)
at controllers.Application.captcha(Application.java:83)
at play.utils.Java.invokeStatic(Java.java:129)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:138
It will not work on GAE since the java.awt API is restricted. Perhaps
you should look at something like http://recaptcha.net/, or trying to
generate the captcha image using the Google Image Manipulation APIs
availables on app engine.
> --
> 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.
>
>
-E.
On 2 mar, 16:23, Guillaume Bort <guillaume.b...@gmail.com> wrote:
> Yes the play.libs.Images.captcha function is a wrapper around simpleCaptcha.
>
> It will not work on GAE since the java.awt API is restricted. Perhaps
> you should look at something likehttp://recaptcha.net/, or trying to
> generate the captcha image using the Google Image Manipulation APIs