Cloudbees + Railo + Coldbox

Hey folks!

I recently came across a super cool cloud hosting service for java apps called Cloudbees - www.cloudbees.com when I read this article from Mark Drew - http://www.markdrew.co.uk/blog/post.cfm/running-railo-in-cloudbees

I’ve only been using it for about a week and it’s been extremely easy to work with since they offer a Heroku like command line interface for deploying apps. I’ve never used Amazon AWS before but my understanding is that Amazon requires you to compile a war file with the full set of files whereas cloudbees does the same but only with deltas (like GIT), resulting in quicker deploy times. it’s a simple as “bees deploy” and within a short amount of time the app is online. There is also the ability to easily add on services like MongoDB, New Relic monitoring, SendGrid mail, etc, and you can configure environments similar to CB’s environment config - http://wiki.cloudbees.com/bin/view/RUN/CloudBeesWebXml

Now, I’m using Railo for the first time and was able to get my build running locally. (Railo + CB 3.5). However, when I deploy to Cloudbees I get the following error related to the routes file not being found. I don’t know yet if there is a way to view the files that are on the server to see if the routes files is there, but I’m guessing that since the app was deployed as a .war, then it should be.

Any ideas? Thanks guys!

Nolan

essage
string Error locating routes file: /config/routes.cfm

StackTrace
string Error locating routes file: /config/routes.cfm at railo.runtime.tag.Throw._doStartTag(Throw.java:142):142 at railo.runtime.tag.Throw.doStartTag(Throw.java:131):131 at system.frameworksupertype_cfc$cf.udfCall4(/mnt/var/staxapps/8135/staxcat/install/webapp.war/frameworks/coldbox/system/FrameworkSupertype.cfc:431):431 at system.frameworksupertype_cfc$cf.udfCall(/mnt/var/staxapps/8135/staxcat/install/webapp.war/frameworks/coldbox/system/FrameworkSupertype.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:214):214 at railo.runtime.type.UDFImpl._call(UDFImpl.java:418):418 at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:376):376 at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774):774 at railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1459):1459 at system.interceptors.ses_cfc$cf.udfCall5(/mnt/var/staxapps/8135/staxcat/install/webapp.war/frameworks/coldbox/system/interceptors/SES.cfc:1272):1272 at system.interceptors.ses_cfc$cf.udfCall(/mnt/var/staxapps/8135/staxcat/install/webapp.war/frameworks/coldbox/system/interceptors/SES.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:214):214 at railo.runtime.type.UDFImpl._call(UDFImpl.java:418):418 at railo.runtime.type.UDFImpl.call(UDFImpl.java:383):383 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:738):738 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1444):1444 at system.interceptors.ses_cfc$cf.udfCall1(/mnt/var/staxapps/8135/staxcat/install/webapp.war/frameworks/coldbox/system/interceptors/SES.cfc:68):68 at system.interceptors.ses_cfc$cf.udfCall(/mnt/var/staxapps/8135/staxcat/install/webapp.war/frameworks/coldbox/system/interceptors/SES.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:214):214 at railo.runtime.type.UDFImpl._call(UDFImpl.java:418):418 at railo.runtime.type.UDFImpl.call(UDFImpl.java:383):383 at railo.runtime.ComponentImpl._call(ComponentImpl.java:609):609 at railo.runtime.ComponentImpl._call(ComponentImpl.java:496):496 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1794):1794 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733):733 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1444):1444 at system.web.services.interceptorservice_cfc$cf.udfCall1(/mnt/var/staxapps/8135/staxcat/install/webapp.war/frameworks/coldbox/system/web/services/InterceptorService.cfc:197):197 at system.web.services.interceptorservice_cfc$cf.udfCall(/mnt/var/staxapps/8135/staxcat/install/webapp.war/frameworks/coldbox/system/web/services/InterceptorService.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:214):214 at railo.runtime.type.UDFImpl._call(UDFImpl.java:418):418 at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:376):376 at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774):774 at railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1459):1459 at system.web.services.interceptorservice_cfc$cf.udfCall1(/mnt/var/staxapps/8135/staxcat/install/webapp.war/frameworks/coldbox/system/web/services/InterceptorService.cfc:103):103 at system.web.services.interceptorservice_cfc$cf.udfCall(/mnt/var/staxapps/8135/staxcat/install/webapp.war/frameworks/coldbox/system/web/services/InterceptorService.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:214):214 at railo.runtime.type.UDFImpl._call(UDFImpl.java:418):418 at railo.runtime.type.UDFImpl.call(UDFImpl.java:383):383 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:738):738 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1444):1444 at system.web.services.interceptorservice_cfc$cf.udfCall1(/mnt/var/staxapps/8135/staxcat/install/webapp.war/frameworks/coldbox/system/web/services/InterceptorService.cfc:74):74 at system.web.services.interceptorservice_cfc$cf.udfCall(/mnt/var/staxapps/8135/staxcat/install/webapp.war/frameworks/coldbox/system/web/services/InterceptorService.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:214):214 at railo.runtime.type.UDFImpl._call(UDFImpl.java:418):418 at railo.runtime.type.UDFImpl.call(UDFImpl.java:383):383 at railo.runtime.ComponentImpl._call(ComponentImpl.java:609):609 at railo.runtime.ComponentImpl._call(ComponentImpl.java:496):496 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1794):1794 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733):733 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1444):1444 at system.web.services.loaderservice_cfc$cf.udfCall(/mnt/var/staxapps/8135/staxcat/install/webapp.war/frameworks/coldbox/system/web/services/LoaderService.cfc:77):77 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:214):214 at railo.runtime.type.UDFImpl._call(UDFImpl.java:418):418 at railo.runtime.type.UDFImpl.call(UDFImpl.java:383):383 at railo.runtime.ComponentImpl._call(ComponentImpl.java:609):609 at railo.runtime.ComponentImpl._call(ComponentImpl.java:496):496 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1794):1794 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733):733 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1444):1444 at system.coldbox_cfc$cf.udfCall1(/mnt/var/staxapps/8135/staxcat/install/webapp.war/frameworks/coldbox/system/Coldbox.cfc:71):71 at system.coldbox_cfc$cf.udfCall(/mnt/var/staxapps/8135/staxcat/install/webapp.war/frameworks/coldbox/system/Coldbox.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:214):214 at railo.runtime.type.UDFImpl._call(UDFImpl.java:418):418 at railo.runtime.type.UDFImpl.call(UDFImpl.java:383):383 at railo.runtime.ComponentImpl._call(ComponentImpl.java:609):609 at railo.runtime.ComponentImpl._call(ComponentImpl.java:496):496 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1794):1794 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733):733 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1444):1444 at application_cfc$cf.udfCall(/mnt/var/staxapps/8135/staxcat/install/webapp.war/Application.cfc:98):98 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:214):214 at railo.runtime.type.UDFImpl._call(UDFImpl.java:418):418 at railo.runtime.type.UDFImpl.call(UDFImpl.java:383):383 at railo.runtime.ComponentImpl._call(ComponentImpl.java:609):609 at railo.runtime.ComponentImpl._call(ComponentImpl.java:496):496 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1794):1794 at railo.runtime.listener.ModernAppListener.call(ModernAppListener.java:347):347 at railo.runtime.listener.ModernAppListener.onApplicationStart(ModernAppListener.java:216):216 at railo.runtime.PageContextImpl.initApplicationContext(PageContextImpl.java:2566):2566 at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:101):101 at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:23):23 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:1991):1991 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:1958):1958 at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:297):297 at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32):32 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717):717 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290):290 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206):206 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233):233 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191):191 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127):127 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102):102 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109):109 at net.stax.appserver.webapp.RequestMonitorValve.invoke(RequestMonitorValve.java:35):35 at net.stax.appserver.admin.StaxApplicationQueryValve.invoke(StaxApplicationQueryValve.java:49):49 at net.stax.appserver.webapp.RequestSetupValve.invoke(RequestSetupValve.java:31):31 at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:647):647 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298):298 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859):859 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588):588 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489):489 at java.lang.Thread.run(Thread.java:662):662

Yes not sure Nolan. Try a mapping name that points to your root.

This.mappings["/myapp"]

Then use that. To check

Hi Luis,

I have the followiing app mappings in my application.cfc

this.mappings["/100pointsystem"] = variables.COLDBOX_APP_ROOT_PATH

.ReplaceFirst("([^\/]+[\/]){1}$", “”)

.ReplaceFirst("([^\/]+[\/]){1}$", “”);

// Application Root

this.mappings[’/approot’] = COLDBOX_APP_ROOT_PATH;

Could it be a case sensitivity issue? i.e. might Cloudbees be a unix
system and your local dev be Windows?

Dominic

Don’t think so. My local machine is OSX.

I tried adding an application-specific mapping for /config/, but haven’t been able to get that to work either.

N

Hey folks,

Well, after a truck-load of tinkering, a few beers, and checking over configs/mappings I was able to get CB 3.5 on Railo working on Cloudbees - http://100pointsystem.nolandubeau.cloudbees.net/ . The default Welcome to ColdBox page will eventually go away, but I’ll leave it up there with debugging enabled in case anyone wants to take a look.

Next step is to turn this app into a REST API with MongoDB under the hood. Woot!

Thanks guys.

Nolan