[ColdBox 4, cbi18n]

I’m getting an odd behavior when going from Lucee to ACF 11. On my Lucee server my app appears to work as intended. Now that I’m putting it on ACF 11, I’m getting errors that complain about my arguments in the getResource method. It is throwing this error at the first location where I bring a value from my resource bundle into the application.

“Cannot invoke method getResource on an object of type coldfusion.runtime.Struct with named arguments. Use ordered arguments instead.”

Has anyone seen this before? Or, have any ideas of what I may have missed?

Thanks,

Steve

No, have not seen that. is this on the i18n module?

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
P/F: 1-888-557-8057
Direct: (909) 248-3408

ColdBox Platform: http://www.coldbox.org

ContentBox Platform: http://www.gocontentbox.org
Linked In: http://www.linkedin.com/pub/3/731/483

Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano | twitter.com/gocontentbox

Can you provide a stack trace of the error please?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Sure, here you go.

coldfusion.runtime.CfJspPage$CannotUseNamedArgsException: Cannot invoke method getResource on an object of type coldfusion.runtime.Struct with named arguments.
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2437)
at cfMixins2ecfm1537040225$funcGETRESOURCE.runFunction(/Applications/ColdFusion11/cfusion/wwwroot/milestone/modules/cbi18n/models/Mixins.cfm:55)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2845)
at cfMain2ecfm121814451.runPage(/Applications/ColdFusion11/cfusion/wwwroot/milestone/layouts/Main.cfm:6)

The layout snippet:

#html.doctype()#

#getResource("selectAward")#

The resource bundle key/value:

selectAward=Selectaward.com

Thank you,

S

Hi S.

I have gone through all my tests in cf11 and cannot reproduce this. The error indicates that the resource service cannot be found in the variables scope. meaning the only logical reason is that the injection is not working. If the injection is not working, it might be that you are trying to request i18n resources before the i18n module has finished loading and activated.

Where are you doing this?

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
P/F: 1-888-557-8057
Direct: (909) 248-3408

ColdBox Platform: http://www.coldbox.org

ContentBox Platform: http://www.gocontentbox.org
Linked In: http://www.linkedin.com/pub/3/731/483

Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano | twitter.com/gocontentbox

Luis, actually the error implies the service is a struct, not a component. I would dump out **variables.**cboxResourceService and getInstance( “resourceService@cbi18n” ) to see what they return.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com