Details
-
Bug
-
Status: Resolved
-
Trivial
-
Resolution: Information Provided
-
2.25.1
-
None
-
None
-
Unknown
Description
I get an error when I want to get the property as indicated here
https://camel.apache.org/components/2.x/languages/groovy-language.html through properties.resolve("test_name") (in JavaSctipt this works)
Error
No signature of method: java.util.LinkedHashMap.resolve() is applicable for argument types: (java.lang.String) values: [test_name]
Possible solutions: remove(java.lang.Object), remove(java.lang.Object), remove(java.lang.Object, java.lang.Object), clone()
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at script1598627841751704336236.run(script1598627841751704336236.groovy:1)
And I also found the same question on https://stackoverflow.com/questions/25472136/apache-camel-groovy-scripting/39465657.
It turns out that there is an error in the documentation and you can't get a property in the groovy?