camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Björn Paulsen (JIRA) <j...@apache.org>
Subject [jira] [Reopened] (CAMEL-9155) Own Component with optional Parameters
Date Fri, 25 Sep 2015 06:56:04 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-9155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Björn Paulsen reopened CAMEL-9155:
----------------------------------

I ask in the Forum/mailing List. And they also say it is not possible to write
.to('csvToXml')

I must insert a parameter:
.to('csvToXml:foo')

But my Component don't need parameters, or the parameters are optional. So I think this is
a bug. 



> Own Component with optional Parameters
> --------------------------------------
>
>                 Key: CAMEL-9155
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9155
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.15.3
>            Reporter: Björn Paulsen
>            Assignee: Claus Ibsen
>
> 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:
> {noformat}
> 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)
> {noformat}
> It is possible to create a Component without Parameters?
> This work:
> {noformat}
> from("file:in/csv?noop=true")
>     .to("cvsToXml:?delimiterChar=;")
>     .to("file:out/csv");
> {noformat}
> This don't work:
> {noformat}
> from("file:in/csv?noop=true")
>     .to("cvsToXml")
>     .to("file:out/csv");
> {noformat}
> Do you need my sources?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message