[ColdBox 4, cbi18n]

39 views
Skip to first unread message

Steve Black

unread,
Jul 13, 2015, 6:45:47 PM7/13/15
to col...@googlegroups.com
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

Luis Majano

unread,
Jul 13, 2015, 6:49:45 PM7/13/15
to col...@googlegroups.com, col...@googlegroups.com
No, have not seen that. is this on the i18n module?


--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/081aafcb-eaee-4bef-84dc-3f88d66d39c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

br...@bradwood.com

unread,
Jul 13, 2015, 11:21:29 PM7/13/15
to col...@googlegroups.com
Can you provide a stack trace of the error please?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

Steve Black

unread,
Jul 14, 2015, 9:55:29 AM7/14/15
to col...@googlegroups.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:

<cfoutput>

#html.doctype()#

<html lang="en">

<head>

<meta charset="utf-8">

<title>#getResource("selectAward")#</title>


The resource bundle key/value:

selectAward=Selectaward.com


Thank you,

S

Luis Majano

unread,
Jul 14, 2015, 11:24:33 AM7/14/15
to col...@googlegroups.com, col...@googlegroups.com
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?

br...@bradwood.com

unread,
Jul 14, 2015, 10:25:21 PM7/14/15
to col...@googlegroups.com
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.
--------- Original Message ---------

<metacharset="utf-8">

Reply all
Reply to author
Forward
0 new messages