Railo on Google Apps Engine

196 views
Skip to first unread message

Katsuyuki Sakai

unread,
Apr 8, 2009, 9:46:59 PM4/8/09
to ra...@googlegroups.com
Hi there,

Is it possible to run Railo on Google Apps Engine?
GAE recently supports JRE6, so I just want to know the possibility.
http://code.google.com/intl/en-US/appengine/docs/java/runtime.html

GAE applies several restrictions to their Java environment.
For example, you cannot create java.lang.Thread, so if Railo uses
Thread in servlet start up phase, it's not possible to run Railo.


Thanks,
Katz

Peter Amiri

unread,
Apr 8, 2009, 9:57:57 PM4/8/09
to ra...@googlegroups.com
This would be extremely cool if it worked. I am reading the docs to
see if we can just use the railo war file to get started. If I get a
chance to try this out, I'll post my results to the list.

-Peter

Mark Drew

unread,
Apr 10, 2009, 2:58:16 PM4/10/09
to ra...@googlegroups.com
So far I dont think you can, there are restrictions on reading (and
writing?) to the WEB-INF folder so it breaks..

I did deploy a simple app but it doesn't run because you get the
following error:

failed AMFServlet
javax.servlet.ServletException: access denied (java.io.FilePermission /
base/data/home/apps/railo-demo/1.332672585908457473/WEB-INF/lib/railo-
server write)
at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:
437)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
256)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at
org
.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
612)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1218)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
500)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
448)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at
com
.google
.apphosting
.runtime
.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:190)
at
com
.google
.apphosting
.runtime
.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:167)
at
com
.google
.apphosting
.runtime
.jetty
.JettyServletEngineAdapter
.serviceRequest(JettyServletEngineAdapter.java:113)
at
com
.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
235)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:4547)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:4545)
at
com
.google
.net
.rpc
.impl
.BlockingApplicationHandler
.handleRequest(BlockingApplicationHandler.java:24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
359)
at com.google.net.rpc.impl.Server$2.run(Server.java:792)
at
com
.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:
56)
at
com
.google
.tracing
.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:
489)
at com.google.net.rpc.impl.Server.startRpc(Server.java:748)
at com.google.net.rpc.impl.Server.processRequest(Server.java:340)
at
com
.google
.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:
422)
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:419)
at
com
.google
.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:
733)
at
com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:
207)
at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101)
at
com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:
249)
at com.google.apphosting.runtime.JavaRuntime
$RpcRunnable.run(JavaRuntime.java:373)
at java.lang.Thread.run(Unknown Source)


MD
Mark Drew
CEO
Railo Technologies UK
mark...@getrailo.com
http://www.getrailo.com





Tim Nelson

unread,
Apr 10, 2009, 3:55:55 PM4/10/09
to ra...@googlegroups.com
The restriction is on writing to the file system. GAE does not allow this. They do allow writing to a log, though.

I see 2 roadblocks; writing to the log files and compiling the cf code. The first could be changed to use the GAE logging feature. And the second could be handled by pre-compiling the cf code.

Are there any other places Railo writes to the file system. The admin config?

I know Railo supports pre-compiled cf code, but I can't find anywhere that explains how to do this.

Another restriction is the use of threads. GAE does not allow spawning of new Threads or ThreadGroups. I assume if you don't use cfthread, this wouldn't be a problem. Is that true?


Tim Nelson

unread,
Apr 10, 2009, 3:59:59 PM4/10/09
to Railo
I just found the Railo blog article on creating an archive (pre-
compiled cf).

Randy

unread,
Apr 14, 2009, 3:19:28 PM4/14/09
to Railo
Any luck trying to get a pre-compiled application up and running on
the App Engine?

Tim Nelson

unread,
Apr 14, 2009, 4:18:04 PM4/14/09
to ra...@googlegroups.com
No. Railo tries to write to the log file and GAE doesn't allow that. I may try to modify Railo to use the logger that they do allow, but I'm sure if there's other areas that would also need changing.

Gert Franz

unread,
Apr 14, 2009, 6:36:13 PM4/14/09
to ra...@googlegroups.com

Well you can configure the loggers to write to the RAM resource. Just modify the corresponding log entries. Have a look at this:

 

http://www.railo.ch/blog/index.cfm/2007/7/26/Railo-Readonly--Start-Railo-from-a-CD

 

Greetings from Switzerland

Gert Franz

Railo Technologies GmbH

gert....@getrailo.com

www.getrailo.ch

 

Join our Mailing List

german:              http://de.groups.yahoo.com/group/railo/

english:                http://groups.google.com/group/railo

linked in:             http://www.linkedin.com/e/gis/71368/0CF7D323BBC1

Bug tracker:       http://jira.jboss.org/jira/browse/RAILO

Railo Blog:     http://www.railo-technologies.com/blog

Ryan Letulle

unread,
Apr 14, 2009, 6:43:05 PM4/14/09
to ra...@googlegroups.com
Very cool.

On Tue, Apr 14, 2009 at 1:36 PM, Gert Franz <gert....@railo.ch> wrote:

Well you can configure the loggers to write to the RAM resource. Just modify the corresponding log entries. Have a look at this:

 

http://www.railo.ch/blog/index.cfm/2007/7/26/Railo-Readonly--Start-Railo-from-a-CD

 

Greetings from Switzerland

Gert Franz

Railo Technologies GmbH

gert....@getrailo.com

www.getrailo.ch

 

Join our Mailing List

german:              http://de.groups.yahoo.com/group/railo/

english:                http://groups.google.com/group/railo

linked in:             http://www.linkedin.com/e/gis/71368/0CF7D323BBC1

Bug tracker:       http://jira.jboss.org/jira/browse/RAILO

Railo Blog:     http://www.railo-technologies.com/blog

 

Von: ra...@googlegroups.com [mailto:ra...@googlegroups.com] Im Auftrag von Tim Nelson
Gesendet: Dienstag, 14. April 2009 18:18
An: ra...@googlegroups.com
Betreff: [railo] Re: Railo on Google Apps Engine

 

No. Railo tries to write to the log file and GAE doesn't allow that. I may try to modify Railo to use the logger that they do allow, but I'm sure if there's other areas that would also need changing.

 







--
Ryan

Tim Nelson

unread,
Apr 14, 2009, 8:12:39 PM4/14/09
to ra...@googlegroups.com
That sounds promising Gert, but it's actually crashing trying to execute java.io.File.exists on Application.cfc. Not sure why this is, the GAE docs say that you can read any file in your directory. I have found some others having issues reading files as well, but nobody seems to have an answer.

Gert Franz

unread,
Apr 14, 2009, 8:25:18 PM4/14/09
to ra...@googlegroups.com

Do you have a stacktrace for us?

 

Gert

 

Von: ra...@googlegroups.com [mailto:ra...@googlegroups.com] Im Auftrag von Tim Nelson
Gesendet: Dienstag, 14. April 2009 22:13
An: ra...@googlegroups.com
Betreff: [railo] Re: Railo on Google Apps Engine

 

That sounds promising Gert, but it's actually crashing trying to execute java.io.File.exists on Application.cfc. Not sure why this is, the GAE docs say that you can read any file in your directory. I have found some others having issues reading files as well, but nobody seems to have an answer.

Tim Nelson

unread,
Apr 14, 2009, 8:33:33 PM4/14/09
to ra...@googlegroups.com
access denied (java.io.FilePermission D:\opt\appengine-java-sdk-1.2.0\demos\gaer
ailotest\Application.cfc read)
        at java.security.AccessControlContext.checkPermission(Unknown Source):-1

        at java.security.AccessController.checkPermission(Unknown Source):-1
        at java.lang.SecurityManager.checkPermission(Unknown Source):-1
        at com.google.appengine.tools.development.DevAppServerFactory$CustomSecu
rityManager.checkPermission(DevAppServerFactory.java:76):76
        at java.lang.SecurityManager.checkRead(Unknown Source):-1
        at java.io.File.exists(Unknown Source):-1
        at java.io.Win32FileSystem.canonicalize(Unknown Source):-1
        at java.io.File.getCanonicalPath(Unknown Source):-1
        at railo.commons.io.res.type.file.FileResource.getCanonicalResource(File
Resource.java:79):79
        at railo.commons.io.res.util.ResourceUtil.getCanonicalResourceEL(Resourc
eUtil.java:566):566
        at railo.commons.io.res.util.ResourceUtil.toExactResource(ResourceUtil.j
ava:220):220
        at railo.runtime.PageSourceImpl.getPhyscalFile(PageSourceImpl.java:277):
277
        at railo.runtime.PageSourceImpl.physcalExists(PageSourceImpl.java:527):5
27
        at railo.runtime.PageSourceImpl.exists(PageSourceImpl.java:519):519
        at railo.runtime.listener.AppListenerUtil.getApplicationPageSourceCurr2R
oot(AppListenerUtil.java:92):92
        at railo.runtime.listener.AppListenerUtil.getApplicationPageSource(AppLi
stenerUtil.java:64):64
        at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.ja
va:21):21
Tue Apr 14 15:31:18 CDT 2009-531 Release: (1)
        at railo.runtime.PageContextImpl.execute(PageContextImpl.java:1638):1638

        at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:2
35):235
        at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32):32
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806):806
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487
):487
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1093):1093
        at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43):43
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1084):1084
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
60):360
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:216):216
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
81):181
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
12):712
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
:405
        at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(De
vAppEngineWebAppContext.java:54):54
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
39):139
        at com.google.appengine.tools.development.JettyContainerService$ApiProxy
Handler.handle(JettyContainerService.java:306):306
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
39):139
        at org.mortbay.jetty.Server.handle(Server.java:313):313
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
6):506
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpCo
nnection.java:830):830
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514):514
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211):211
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381):381
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:396):396
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
.java:442):442
        at railo.runtime.op.Caster.toPageException(Caster.java:2908):2908
        at railo.runtime.PageContextImpl.execute(PageContextImpl.java:1641):1641

        at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:2
35):235
        at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32):32
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806):806
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487
):487
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1093):1093
        at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43):43
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1084):1084
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
60):360
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:216):216
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
81):181
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
12):712
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
:405
        at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(De
vAppEngineWebAppContext.java:54):54
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
39):139
        at com.google.appengine.tools.development.JettyContainerService$ApiProxy
Handler.handle(JettyContainerService.java:306):306
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
39):139
        at org.mortbay.jetty.Server.handle(Server.java:313):313
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
6):506
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpCo
nnection.java:830):830
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514):514
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211):211
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381):381
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:396):396
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
.java:442):442

Andrea Campolonghi

unread,
Apr 14, 2009, 8:41:27 PM4/14/09
to ra...@googlegroups.com

Gert,

 

I do nto have really a lot of time but I would be glad to help.

 

Andrea

 

Da: ra...@googlegroups.com [mailto:ra...@googlegroups.com] Per conto di Gert Franz
Inviato: martedì 14 aprile 2009 22.25
A: ra...@googlegroups.com
Oggetto: AW: [railo] Re: Railo on Google Apps Engine

Tim Nelson

unread,
Apr 15, 2009, 1:22:44 AM4/15/09
to Railo
I decided to try this in production and it doesn't throw this same
error. I updated the log files and temp directory to use ram, but it
crashes on railo.commons.io.SystemUtil.isFSCaseSensitive() because it
calls java.io.createTempFile(), which is not allowed. I changed that
function and tried building the railo source files, but I was
unsuccessful. They compiled, but I couldn't get them exported to a
jar. There appears to be some overlap in the 2 source trees. I think I
will wait until you publish a build procedure to continue with this.

Baz

unread,
May 30, 2009, 10:04:49 PM5/30/09
to Railo
Are there plans to make Railo GAE ready?

Sean Corfield

unread,
Jun 1, 2009, 8:01:14 PM6/1/09
to ra...@googlegroups.com
On Sat, May 30, 2009 at 3:04 PM, Baz <thin...@gmail.com> wrote:
> Are there plans to make Railo GAE ready?

Not at this time. We've discussed the issue internally and feel that
GAE is too restrictive to make the effort worthwhile and for now we'll
point people at the special version of the Open BlueDragon which has
been created for GAE (and which has a lot of features changed /
disabled to make it run in that environment).
--
Sean A Corfield -- (904) 302-SEAN
Railo Technologies US -- http://getrailo.com/
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

Reply all
Reply to author
Forward
0 new messages