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?
Thanks!
Andy