You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Denis Delangle <de...@gmail.com> on 2013/01/21 16:52:03 UTC

Quartz component and context endpoint cache

Hello,

Using camel-quartz in my camel based application (V 2.10.3), I
schedule a backup every day at 19h20 using this expression
from(quartz://backup?cron=0+20+19+?+*+*).process(...

the trigger is successfully executed the first day at 19h20, but
failed the next day with this stacktrace.
[ERROR] 2013-01-19 19:20:00,003 org.quartz.core.ErrorLogger Job
(DEFAULT.quartz-endpoint148 threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See
nested exception: org.apache.camel.ResolveEndpointFailedException:
Failed to resolve endpoint: quartz://backup?cron=0+20+19+%3F+*+* due
to: A Quartz job already exists with the name/group: backup/Camel]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:227)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint: quartz://backup?cron=0+20+19+%3F+*+* due to: A
Quartz job already exists with the name/group: backup/Camel
        at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:479)
        at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:492)
        at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:50)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
        ... 1 more
Caused by: java.lang.IllegalArgumentException: A Quartz job already
exists with the name/group: backup/Camel
        at org.apache.camel.component.quartz.QuartzComponent.createEndpoint(QuartzComponent.java:137)
        at org.apache.camel.component.quartz.QuartzComponent.createEndpoint(QuartzComponent.java:54)
        at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:91)
        at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:461)
        ... 4 more

I scheduled other tasks running every 5 minutes without any errors.

Looking at the code, I understand it can append when endpoints are
removed from the LRU of the camelContext (endoints field from
DefaultCamelContext).
Do you see any other reason why I could have this error ? Should I
open an issue ?

Thank's,

Denis

Re: Quartz component and context endpoint cache

Posted by Denis Delangle <de...@gmail.com>.
Hi thanks for your answer,

I created https://issues.apache.org/jira/browse/CAMEL-5993 with a
junit test to reproduce the bug.

Denis

2013/1/22 Claus Ibsen <cl...@gmail.com>:
> Hi
>
> That could indeed indicate a bug in Camel.
>
> Fell free to log a JIRA ticket in the issue tracker
> http://camel.apache.org/support
>
>
>
> On Mon, Jan 21, 2013 at 4:52 PM, Denis Delangle
> <de...@gmail.com> wrote:
>> Hello,
>>
>> Using camel-quartz in my camel based application (V 2.10.3), I
>> schedule a backup every day at 19h20 using this expression
>> from(quartz://backup?cron=0+20+19+?+*+*).process(...
>>
>> the trigger is successfully executed the first day at 19h20, but
>> failed the next day with this stacktrace.
>> [ERROR] 2013-01-19 19:20:00,003 org.quartz.core.ErrorLogger Job
>> (DEFAULT.quartz-endpoint148 threw an exception.
>> org.quartz.SchedulerException: Job threw an unhandled exception. [See
>> nested exception: org.apache.camel.ResolveEndpointFailedException:
>> Failed to resolve endpoint: quartz://backup?cron=0+20+19+%3F+*+* due
>> to: A Quartz job already exists with the name/group: backup/Camel]
>>         at org.quartz.core.JobRunShell.run(JobRunShell.java:227)
>>         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
>> Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
>> resolve endpoint: quartz://backup?cron=0+20+19+%3F+*+* due to: A
>> Quartz job already exists with the name/group: backup/Camel
>>         at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:479)
>>         at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:492)
>>         at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:50)
>>         at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
>>         ... 1 more
>> Caused by: java.lang.IllegalArgumentException: A Quartz job already
>> exists with the name/group: backup/Camel
>>         at org.apache.camel.component.quartz.QuartzComponent.createEndpoint(QuartzComponent.java:137)
>>         at org.apache.camel.component.quartz.QuartzComponent.createEndpoint(QuartzComponent.java:54)
>>         at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:91)
>>         at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:461)
>>         ... 4 more
>>
>> I scheduled other tasks running every 5 minutes without any errors.
>>
>> Looking at the code, I understand it can append when endpoints are
>> removed from the LRU of the camelContext (endoints field from
>> DefaultCamelContext).
>> Do you see any other reason why I could have this error ? Should I
>> open an issue ?
>>
>> Thank's,
>>
>> Denis
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen

Re: Quartz component and context endpoint cache

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

That could indeed indicate a bug in Camel.

Fell free to log a JIRA ticket in the issue tracker
http://camel.apache.org/support



On Mon, Jan 21, 2013 at 4:52 PM, Denis Delangle
<de...@gmail.com> wrote:
> Hello,
>
> Using camel-quartz in my camel based application (V 2.10.3), I
> schedule a backup every day at 19h20 using this expression
> from(quartz://backup?cron=0+20+19+?+*+*).process(...
>
> the trigger is successfully executed the first day at 19h20, but
> failed the next day with this stacktrace.
> [ERROR] 2013-01-19 19:20:00,003 org.quartz.core.ErrorLogger Job
> (DEFAULT.quartz-endpoint148 threw an exception.
> org.quartz.SchedulerException: Job threw an unhandled exception. [See
> nested exception: org.apache.camel.ResolveEndpointFailedException:
> Failed to resolve endpoint: quartz://backup?cron=0+20+19+%3F+*+* due
> to: A Quartz job already exists with the name/group: backup/Camel]
>         at org.quartz.core.JobRunShell.run(JobRunShell.java:227)
>         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
> Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
> resolve endpoint: quartz://backup?cron=0+20+19+%3F+*+* due to: A
> Quartz job already exists with the name/group: backup/Camel
>         at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:479)
>         at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:492)
>         at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:50)
>         at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
>         ... 1 more
> Caused by: java.lang.IllegalArgumentException: A Quartz job already
> exists with the name/group: backup/Camel
>         at org.apache.camel.component.quartz.QuartzComponent.createEndpoint(QuartzComponent.java:137)
>         at org.apache.camel.component.quartz.QuartzComponent.createEndpoint(QuartzComponent.java:54)
>         at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:91)
>         at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:461)
>         ... 4 more
>
> I scheduled other tasks running every 5 minutes without any errors.
>
> Looking at the code, I understand it can append when endpoints are
> removed from the LRU of the camelContext (endoints field from
> DefaultCamelContext).
> Do you see any other reason why I could have this error ? Should I
> open an issue ?
>
> Thank's,
>
> Denis



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen