Hi. If that really is your xml it's because you're not escaping the &. You
have to use & entity ref in the endpoint uri
-John
On Jun 3, 2016 2:12 AM, "qwertywx" <qwert...@hotmail.com> wrote:

hi,

I have created an endpoint like:

<camel:endpoint id="sqlEndpoint"
uri="sql:${sqlQuery}?scheduler=spring&scheduler.cron=0+6+8+*+*&dataSourceRef=veloxityDS&useIterator=false"/>

But when I do that, jvm throws:

org.apache.camel.FailedToCreateConsumerException: Failed to create Consumer
for endpoint: Endpoint[sql://$select * from
dual?dataSourceRef=veloxityDS&scheduler=spring&scheduler.cron=0+6+8++&useIterator=false].
Reason: There are 1 scheduler parameters that couldn't be set on the
endpoint. Check the uri if the parameters are spelt correctly and that they
are properties of the endpoint. Unknown parameters=[{cron=0 6 8 * *}]

I have read documents and inspected source code about it, debugged it. As
far as I have seen,
org.apache.camel.impl.ScheduledPollEndpoint.configureScheduledPollConsumerProperties(Map<String,
Object>, Map<String, Object>) method is running before
org.apache.camel.impl.ScheduledPollEndpoint.setScheduler(String) .

So the first method always try to initialize scheduler as default camel
scheduler.

Am I missing something or is this really a bug?

It still gives exception. The only case that it initialize scheduler
correctly is , when I create a spring bean and give it like
..scheduler=#scheduler

Thx



--
View this message in context:
http://camel.465427.n5.nabble.com/Camel-ScheduledPollEndpoint-class-scheduler-setup-in-SqlComponent-tp5783390.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to