Coldbox 3.6.0, Railo 4.0.4 - Wirebox DSL issue tag vs. script

Hi - we are finally trying to migrate some of our apps over to Railo. We’ve been having a bit of a difficulty though with the wirebox property injections. Currently for ACF we have all of our models (written in cfscript) in the “model” folder and then map that directory in wirebox.cfc e.g. mapDirectory( “model” ) and then autowire via property injections like so:

property name=“utilDAO” inject;

where utilDAO is in the util directory of the model folder. This works everywhere in CF 9 and 10 but while trying on Railo (both the Tomcat install and the Jetty Express) we’re having issues and get this error:

Application Execution ExceptionError Type: expression : 0

Error Messages: variable [UTILDAO] doesn’t exist

So I tried to remove our app from the equation and do the same with the “Simple” app template… just to make sure there was nothing else in our complex app that was causing this. In doing so, we have the same issue, but it seems to work if we modify the above statement to:

property name=“utilDAO” inject=“utilDAO”;

Next I tried a tag based model and injected like this:

<cfproperty name=“utilDAO” inject/ >

Here it worked without needing to modify to inject=“utilDAO”

So from my tests, in Railo, using script based models, one cannot just use “inject” but must qualify it. Is that right? If so, why and if not, what am I doing wrong?


That’s right. This is a bug for railo.

​Not sure if there is a workaround on this.

Thank Luis - easily fixed with a little old sitewide regex! I just wanted to make sure I wasn’t missing anything… I’m not sure this is noted in DOCs (at least I couldn’t find it) so perhaps it ought to be added?


Maybe you can vote for the bug in Railo, or add it to their bug system. I think Brad added this to them.

I can’t do anything on my end, as the getMetadata() function returns nothing I can use.


Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager: