Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15480

No signature of method: java.util.LinkedHashMap.resolve() error when get property in groovy script

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Information Provided
    • 2.25.1
    • None
    • camel-groovy
    • 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?

      Attachments

        1. image-2020-08-30-13-44-37-085.png
          28 kB
          Mikhail Lukyanov
        2. image-2020-08-30-13-47-38-112.png
          20 kB
          Mikhail Lukyanov
        3. image-2020-08-30-13-52-46-411.png
          9 kB
          Mikhail Lukyanov

        Activity

          People

            Unassigned Unassigned
            lukymiv Mikhail Lukyanov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: