camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: updating from camel-quartz 2.4 to 2.6
Date Wed, 30 Mar 2011 10:47:24 GMT
Hi

You have another quartz job with the same name. The name should really
be unique so you avoid duplicate clashes.

And its much easier to define the quartz endpoint as a pure string,
instead of creating it manually as you do in java code.


On Wed, Mar 30, 2011 at 11:39 AM, JacobS <jacobhameiri@gmail.com> wrote:
> after moving from camel-quartz 2.4.0 to 2.6.0 I started getting exceptions
> when the trigger is fired:
>
> 10:39:47.776 [DefaultQuartzScheduler_Worker-9] ERROR
> org.quartz.core.JobRunShell - Job DEFAULT.quartz-endpoint140 threw an
> unhandled Exception:
> org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint:
> quartz://Tasks/22 due to: A Quartz job already exists with the name/group:
> 22_trigger/Tasks
>        at
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:449)
> ~[bundlefile:2.6.0]
>        at
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:463)
> ~[bundlefile:2.6.0]
>        at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:50)
> ~[bundlefile:2.6.0]
>        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
> ~[bundlefile:1.6.2]
>        at
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
> [bundlefile:1.6.2]
> Caused by: java.lang.IllegalArgumentException: A Quartz job already exists
> with the name/group: 22_trigger/Tasks
>        at
> org.apache.camel.component.quartz.QuartzComponent.createEndpoint(QuartzComponent.java:122)
> ~[bundlefile:2.6.0]
>        at
> org.apache.camel.component.quartz.QuartzComponent.createEndpoint(QuartzComponent.java:54)
> ~[bundlefile:2.6.0]
>        at
> org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:75)
> ~[bundlefile:2.6.0]
>        at
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:431)
> ~[bundlefile:2.6.0]
>        ... 4 common frames omitted
>
> maybe I am adding the the QuartzEndpoint the wrong way, this is the way I am
> doing it ( used to work ):
>
> camelContext.addRoutes(new RouteBuilder() {
>
>        @Override
>        public void configure() throws Exception {
>                QuartzComponent quartzComponent = (QuartzComponent)
> camelContext.getComponent("quartz");
>                QuartzEndpoint endpoint = new QuartzEndpoint(null, quartzComponent);
>                Trigger trigger = createTrigger();
>                trigger.setGroup("Tasks");
>                trigger.setName(id);
>                endpoint.setTrigger(trigger);
>
>                JobDataMap dataMap = createJobDataMap();
>                trigger.setJobDataMap(dataMap);
>
>                camelContext.addEndpoint("quart_qtx_" + trigger.getName(), endpoint);
>
>                from("quart_qtx_" + trigger.getName())
>                        ...
>                .to("direct:mock_dest");
>        }
> });
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/updating-from-camel-quartz-2-4-to-2-6-tp4271113p4271113.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message