I did some test on my side, I cannot reproduce the error that you meet. From the failure with recovery log that you showed, The next scheduled is null and Camel Job cannot find the QuartzEndpoint.
2014-11-25 12:29:08,599 [ontext_Worker-1] INFO LoggingTriggerHistoryPlugin - Trigger [RECOVERING_JOBS.recover_16898502964_1416898727319] fired job [cluster.quartz] scheduled at: 25-11-2014 12:28:00.000, next scheduled at: null 2014-11-25 12:29:08,600 [ontext_Worker-1] INFO LoggingJobHistoryPlugin - Job [cluster.quartz] to be fired by trigger [RECOVERING_JOBS.recover_16898502964_1416898727319], re-fire: 0 2014-11-25 12:29:08,604 [ontext_Worker-1] WARN CamelJob - Cannot find existing QuartzEndpoint with uri: quartz2://cluster/quartz?cron=0+0%2F4+*+*+*+%3F&recoverableJob=true&stateful=true. Creating new endpoint instance. Can you tell me how did you stop the job ? What’s your quartz cluster looks like ? If you have a test case to share, it could help us to resolve the issue more easily. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On November 25, 2014 at 9:56:46 PM, selva (sgpsel...@gmail.com) wrote: > Hi Willem, > > I have tested with camel 2.14.1-SNAPSHOT and the exception is gone but > QueryBuilderProcessor is not getting called from quartz end point. > > Please find below configuration and logging information for both recovery > and success scenario. In success scenario QueryBuilderProcessor is getting > called from quartz endpoint and able see some system.out.printl statement in > success case but its failing in recovery case. > > Please help me to solve this issue. > > Route Configuration: > > > > uri="quartz2://cluster/quartz?cron=0+0/4+++*+?&durableJob=true&stateful=true&recoverableJob=true"> > > > //calling sub rout here. > ... > > > > > > > > Please find the below logs for Calling QueryBuilderProcessor from quartz > endpoint: > ================================================================================= > > > Case 1 : //Logs for Immediate recovery : failure with recovery > --------------------------------------------------------------- > 2014-11-25 12:28:47,319 [_ClusterManager] INFO JobStoreTX > - ClusterManager: detected 1 failed or restarted instances. > 2014-11-25 12:28:47,319 [_ClusterManager] INFO JobStoreTX > - ClusterManager: Scanning for instance "16898502964"'s failed in-progress > jobs. > 2014-11-25 12:28:56,675 [_ClusterManager] INFO JobStoreTX > - ClusterManager: ......Scheduled 1 recoverable job(s) for recovery. > 2014-11-25 12:29:08,599 [ontext_Worker-1] INFO LoggingTriggerHistoryPlugin > - Trigger [RECOVERING_JOBS.recover_16898502964_1416898727319] fired job > [cluster.quartz] scheduled at: 25-11-2014 12:28:00.000, next scheduled at: > null > 2014-11-25 12:29:08,600 [ontext_Worker-1] INFO LoggingJobHistoryPlugin > - Job [cluster.quartz] to be fired by trigger > [RECOVERING_JOBS.recover_16898502964_1416898727319], re-fire: 0 > 2014-11-25 12:29:08,604 [ontext_Worker-1] WARN CamelJob > - Cannot find existing QuartzEndpoint with uri: > quartz2://cluster/quartz?cron=0+0%2F4+*+*+*+%3F&recoverableJob=true&stateful=true. > > Creating new endpoint instance. > 2014-11-25 12:29:09,514 [ontext_Worker-1] INFO QuartzEndpoint > - Job cluster.quartz (triggerType=CronTriggerImpl, > jobClass=StatefulCamelJob) is scheduled. Next fire date is null > 2014-11-25 12:29:09,526 [ontext_Worker-1] INFO LoggingJobHistoryPlugin > - Job [cluster.quartz] execution complete and reports: null > 2014-11-25 12:29:09,528 [ontext_Worker-1] INFO LoggingTriggerHistoryPlugin > - Trigger [RECOVERING_JOBS.recover_16898502964_1416898727319] completed > firing job [cluster.quartz] with resulting trigger instruction code: DELETE > TRIGGER. Next scheduled at: null > > > case 2: //Normal flow : success > ------------------------------- > 2014-11-25 12:32:04,901 [ontext_Worker-2] INFO LoggingTriggerHistoryPlugin > - Trigger [cluster.quartz] fired job [cluster.quartz] scheduled at: > 25-11-2014 12:32:00.000, next scheduled at: 25-11-2014 12:36:00.000 > 2014-11-25 12:32:04,902 [ontext_Worker-2] INFO LoggingJobHistoryPlugin > - Job [cluster.quartz] to be fired by trigger [cluster.quartz], re-fire: 0 > 2014-11-25 12:32:04,958 [ontext_Worker-2] INFO QueryBuilderProcessor - > Started > ****processor started******//system.out line from QueryBuilderProcessor > ****processor Ends****** > 2014-11-25 12:32:16,658 [ontext_Worker-2] INFO LoggingJobHistoryPlugin > - Job [cluster.quartz] execution complete and reports: null > 2014-11-25 12:32:16,658 [ontext_Worker-2] INFO LoggingTriggerHistoryPlugin > - Trigger [cluster.quartz] completed firing job [cluster.quartz] with > resulting trigger instruction code: DO NOTHING. Next scheduled at: > 25-11-2014 12:36:00.000 > > > Captured in qrtz_triggers table: > > S.NO. TRIGGER_GROUP JOB_NAME JOB_GROUP NEXT_FIRE_TIME > PREV_FIRE_TIME PRIORITY TRIGGER_STATE TRIGGER_TYPE > 1. RECOVERING_JOBS quartz cluster 1416905400000 -1 > 5 SIMPLE WAITING > 2. cluster quartZ cluster 1416905640000 > 1416905400000 5 CRON WAITING > > > Question: > 1.In recovery scenario QueryBuilderProcessor bean is not getting called from > quartz endpoint but in next interval QueryBuilderProcessor bean is getting > called . Did I miss anything here? > > *jar downloaded from below link:* > http://repository.apache.org/content/groups/snapshots/org/apache/camel/camel-quartz2/2.14.1-SNAPSHOT/ > > > > Please correct me If I did any mistake. > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Quartz-clustering-in-camel-spring-DSL-JIRA-CAMEL-8076-tp5759589.html > > Sent from the Camel - Users mailing list archive at Nabble.com. >