| Author |
Message |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 01/10/2011 09:17:56
|
Dckc
master
Joined: 09/08/2010 09:00:39
Messages: 59
Offline
|
Hi all,
I have been testing the new release 2.0 adding a bulk of jobs but I am getting the following error.
Exception in thread "main" org.quartz.JobPersistenceException: The job (null) referenced by the trigger does not exist.
Basically what I am doing is:
Map<JobDetail, List<Trigger>> triggersAndJobs;
triggersAndJobs = new HashMap<JobDetail, List<Trigger>>();
for (int count = 1; count <= _numberOfJobs; count++) {
JobDetail job = newJob(SimpleJob_1.class).withDescription("holaJob").withIdentity("job" + count, "group_1").requestRecovery() // ask scheduler to re-execute this job if it was in progress when the scheduler went down...
.build();
//SimpleTrigger trigger = (SimpleTrigger) newTrigger().withDescription("holatriger").withIdentity("trigger_" + count, "group1").startAt(startTime).build();
List<Trigger> list = new ArrayList();
list.add( trigger);
triggersAndJobs.put(job, list);
}
sched.scheduleJobs(triggersAndJobs, false);
What am I doing wrong in the above example.
Do you have any example of bulk of jobs?
Any help will be much appreciated.
Thank you.
Regards
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 01/10/2011 15:31:29
|
gkeim
ophanim
Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline
|
Is it "group1" or "group_1?"
|
Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community |
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 01/11/2011 00:37:57
|
Dckc
master
Joined: 09/08/2010 09:00:39
Messages: 59
Offline
|
Thank for your reply.
I found the error it was the group and more importantly the method ".forJob(job)"
SimpleTrigger trigger = (SimpleTrigger) newTrigger()
.withDescription("holatriger")
.withIdentity("trigger_" + count, "group_1")
.forJob(job)
.startAt(startTime)
.build();
I find it hard to test the new Quartz version since there is no an API description and not enough examples.
It will be great to have an API or anything that help.
Thank you.
Regards,
Daniel A.
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 01/11/2011 07:28:54
|
steve
ophanim
Joined: 05/24/2006 14:22:53
Messages: 619
Offline
|
The docs are Definitely something we are working on. Just a heads up that all the samples in the kit have been updated and may be helpful to you in the meantime.
Cheers,
Steve
|
Want to post to this forum? Join the Terracotta Community |
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 01/12/2011 15:09:19
|
gkeim
ophanim
Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline
|
I've created the following JIRA ticket to track this issue:
https://jira.terracotta.org/jira/browse/QTZ-116
|
Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community |
|
|
 |
|
|