Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4ABE2182A2 for ; Tue, 7 Jul 2015 08:54:54 +0000 (UTC) Received: (qmail 9214 invoked by uid 500); 7 Jul 2015 08:54:53 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 9161 invoked by uid 500); 7 Jul 2015 08:54:53 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Delivered-To: moderator for users@camel.apache.org Received: (qmail 4338 invoked by uid 99); 7 Jul 2015 08:50:20 -0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of remziay@gmail.com does not designate 162.253.133.15 as permitted sender) Date: Tue, 7 Jul 2015 01:49:53 -0700 (MST) From: tesla To: users@camel.apache.org Message-ID: <1436258993622-5768936.post@n5.nabble.com> Subject: camel groovy error. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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.