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 78D6C17622 for ; Thu, 24 Sep 2015 08:43:06 +0000 (UTC) Received: (qmail 68196 invoked by uid 500); 24 Sep 2015 08:42:43 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 68151 invoked by uid 500); 24 Sep 2015 08:42:43 -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 Received: (qmail 68139 invoked by uid 99); 24 Sep 2015 08:42:43 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Sep 2015 08:42:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1553818112D for ; Thu, 24 Sep 2015 08:42:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.214 X-Spam-Level: * X-Spam-Status: No, score=1.214 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ezQnqqBW7q9M for ; Thu, 24 Sep 2015 08:42:28 +0000 (UTC) Received: from mail-io0-f174.google.com (mail-io0-f174.google.com [209.85.223.174]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id D8430206E3 for ; Thu, 24 Sep 2015 08:42:27 +0000 (UTC) Received: by ioii196 with SMTP id i196so69644653ioi.3 for ; Thu, 24 Sep 2015 01:42:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=knfpv83J8UPI+LeXYQavF6h7eeH1XwIMnnYcXXZbAjA=; b=GlcFO8a+FXwEn4+7bPywZGrxnphb4UHvOnEwQ6KuBAZhdu2/OetzjqDMsH1Z/mFa6d FL+YB9rmZk0m6u9Vzv9vpyqVzk9BJcAKb/RjJHDJjZNNwQ6D31sXOQNzDu+k8DOEyW7z rXELH0q5TCcGrAo0URo69RzD6VWZ8NYVC2HMfS4QmILIpKas7KP6nFUXduE1l/lenQT/ 9zL+DpS1sEXbblhaB7h8ck0GiZcxqpL96ZTu3vkaExAVPfwTjhahsZHsxRzmKUV00Ikp RaoJUlmcLpgfjyPrG/zzzJlHXeKEmHATTR0RCbL+JEwwIqaMQ41MLnF3dqZfRa9I8ZHl pIfg== X-Received: by 10.107.165.140 with SMTP id o134mr40330150ioe.29.1443084146924; Thu, 24 Sep 2015 01:42:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.117.67 with HTTP; Thu, 24 Sep 2015 01:42:07 -0700 (PDT) In-Reply-To: <1443082309105-5771889.post@n5.nabble.com> References: <1443082309105-5771889.post@n5.nabble.com> From: Claus Ibsen Date: Thu, 24 Sep 2015 10:42:07 +0200 Message-ID: Subject: Re: Own Component with optional Parameters To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 Yeah that would help. On Thu, Sep 24, 2015 at 10:11 AM, burner wrote: > Hello Together, > I wrote a custom component for Camel 2.15.3. This component extends from > DefaultComponent and work if I put parameters in the URI, but without > Parameters I get following Error Message: > > org.apache.camel.component.bean.AmbiguousMethodCallException: Ambiguous > method invocations possible: [public org.apache.camel.Endpoint > org.apache.camel.impl.DefaultComponent.createEndpoint(java.lang.String) > throws java.lang.Exception, public org.apache.camel.EndpointConfiguration > org.apache.camel.impl.DefaultComponent.createConfiguration(java.lang.String) > throws java.lang.Exception]. Exchange[Message: > Header1;Header2;Header3;Header4;Header5;Header6;Header7;Header8;Header9;Header10 > Value1_1;Value2_1;Value3_1;Value4_1;Value5_1;Value6_1;Value7_1;Value8_1;Value9_1;Value10_1 > Value1_2;Value2_2;Value3_2;Value4_2;Value5_2;Value6_2;Value7_2;Value8_2;Value9_2;Value10_2 > Value1_3;Value2_3;Value3_3;Value4_3;Value5_3;Value6_3;Value7_3;Value8_3;Value9_3;Value10_3 > Value1_4;Value2_4;Value3_4;Value4_4;Value5_4;Value6_4;Value7_4;Value8_4;Value9_4;Value10_4 > Value1_5;Value2_5;Value3_5;Value4_5;Value5_5;Value6_5;Value7_5;Value8_5;Value9_5;Value10_5 > Value1_6;Value2_6;Value3_6;Value4_6;Value5_6;Value6_6;Value7_6;Value8_6;Value9_6;Value10_6 > Value1_7;Value2_7;Value3_7;Value4_7;Value5_7;Value6_7;Value7_7;Value8_7;Value9_7;Value10_7 > Value1_8;Value2_8;Value3_8;Value4_8;Value5_8;Value6_8;Value7_8;Value8_8;Value9_8;Value10_8 > Value1_9;Value2_9;Value3_9;Value4_9;Value5_9;Value6_9;Value7_9;Value8_9;Value9_9;Value10_9 > Value1_10;Value2_10;Value3_10;Value4_10;Value5_10;Value6_10;Value7_10;Value8_10;Value9_10;Value10_10... > [Body clipped after 1000 chars, total length is 2012]] > at > org.apache.camel.component.bean.BeanInfo.chooseBestPossibleMethodInfo(BeanInfo.java:745) > at > org.apache.camel.component.bean.BeanInfo.chooseMethodWithMatchingBody(BeanInfo.java:676) > at > org.apache.camel.component.bean.BeanInfo.chooseMethod(BeanInfo.java:544) > at > org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:273) > at > org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:180) > at > org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:149) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72) > at > org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163) > at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:118) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:80) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) > at > org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:423) > at > org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:211) > at > org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:175) > at > org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187) > at > org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > > It is possible to create a Component without Parameters? > > This work: > > from("file:in/csv?noop=true") > .to("cvsToXml:?delimiterChar=;") > .to("file:out/csv"); > > This don't work: > > from("file:in/csv?noop=true") > .to("cvsToXml") > .to("file:out/csv"); > > Do you need my sources? > > Thank You > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Own-Component-with-optional-Parameters-tp5771889.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2nd edition: https://www.manning.com/books/ibsen2