[
https://issues.apache.org/jira/browse/GROOVY-7904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15415139#comment-15415139
]
Paul King edited comment on GROOVY-7904 at 8/10/16 11:29 AM:
-------------------------------------------------------------
java.lang.String doesn't have a {{name()}} method, so it depends on what row is
as to whether that is the expected result or not.
I presume you are doing some XML parsing but you don't show how you set up your
parser, what you are parsing or any stack trace related to parsing code, so
it's a bit hard to guess.
You might be better off sending a more detailed email to the Groovy user
mailing list rather than raising a bug report here.
was (Author: paulk):
java.lang.String doesn't have a {{name()}} method, so it depends on what row is
as to whether that is the expected result or not.
I presume you are doing some XML parsing but you don't show how you set up your
parser, what you are parsing or any stack trace related to parsing code, so
it's a bit hard to guess.
> groovy.lang.MissingMethodException
> ----------------------------------
>
> Key: GROOVY-7904
> URL: https://issues.apache.org/jira/browse/GROOVY-7904
> Project: Groovy
> Issue Type: Bug
> Components: groovy-jdk
> Affects Versions: 2.3.3, 2.3.10
> Reporter: Dwarakesh
>
> I have upgraded the groovy jar from 1.5 to 2.3.3 in order to support Java 8.
> When running my application I am getting the below error and I have tried
> using the below possible solutions as well. But still getting the same error
> with different possible solutions.
> Can some one help me on this and let me know if there is any issue with the
> upgraded groovy jar 2.3.3
> Code:
> ================================================
> def tickets = row.'**'.find { it.name() == 'ITT_TICKETS' }
> =============================================
> ERROR:
> Possible solutions: take(int), any(), any(groovy.lang.Closure), wait(),
> size(), size()
> MIME-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: quoted-printable
> Java Stack Trace:
> groovy.lang.MissingMethodException: No signature of method:
> java.lang.String.name() is applicable for argument types: () values: []
> Possible solutions: take(int), any(), any(groovy.lang.Closure), wait(), siz=
> e(), size() =09at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:56)
> at
> org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46)
> at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
> at
> org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49)
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)