Hi Can you try with latest release of Camel, and maybe newer Groovy?
I wonder if groovy somehow causes java reflection to "see" some additional methods. And maybe there is a way to filter out these duplicates? But trying with latest code first is needed - as we have fixed/improve camel since that old release. On Tue, Jul 7, 2015 at 10:49 AM, tesla <remz...@gmail.com> wrote: > Hi I am facing a strange problem. I have some groovy code like that: > > import org.apache.camel.model.language.JsonPathExpression; > import org.apache.camel.impl.DefaultExchange; > > String endUserId = new > JsonPathExpression("\$.amountTransaction.endUserId").evaluate((DefaultExchange) > exchange,String.class); > exchange.setProperty("endUserId", endUserId); > > It simply tries to find what is the endUserId from message body. But > sometimes camel is starting to throw this exception : > > EXCEPTION groovy.lang.GroovyRuntimeException: Ambiguous method overloading > for method org.apache.camel.model.language > .JsonPathExpression#evaluate. > Cannot resolve which method to invoke for [class > org.apache.camel.impl.DefaultExchange, class java.lang.Class] due to > overlapping prototypes > between: > [interface org.apache.camel.Exchange, class java.lang.Class] > [interface org.apache.camel.Exchange, class > java.lang.Class]\ngroovy.lang.GroovyRuntimeException: Ambiguous method > overloading for me > thod org.apache.camel.model.language.JsonPathExpression#evaluate.\nCannot > resolve which method to invoke for [class org.apache.camel.impl.Def > aultExchange, class java.lang.Class] due to overlapping prototypes > between:\n [interface org.apache.camel.Exchange, class java.lang.Class]\ > n [interface org.apache.camel.Exchange, class java.lang.Class]\n at > groovy.lang.MetaClassImpl.chooseMostSpecificParams(MetaClassImpl.j > ava:3031)\n at > groovy.lang.MetaClassImpl.chooseMethodInternal(MetaClassImpl.java:2983)\n > at groovy.lang.MetaClassImpl.chooseMethod(Met > aClassImpl.java:2926)\n at > groovy.lang.MetaClassImpl.getMethodWithCachingInternal(MetaClassImpl.java:1203)\n > at groovy.lang.MetaClassImpl. > createPojoCallSite(MetaClassImpl.java:3130)\n at > org.codehaus.groovy.runtime.callsite.CallSiteArray.createPojoSite(CallSiteArray.java:129)\ > n at > org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:163)\n > at org.codehaus.groovy.runtime.callsi > te.CallSiteArray.defaultCall(CallSiteArray.java:45)\n at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:1 > > I am using camel 2.13 and groovy-2.2.2. What I am doing wrong? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/camel-groovy-error-tp5768936.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/