Quartz Scheduler error while running a task

I am trying to use Quartz 2.1.1 with Spring 3.0.5.

I configured Scheduler with this line: <bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"/>

I wrote a simple class called TestJobthat implements an interface Job. I can successfully configure the work, start and schedule it. The problem is that when the task starts and quartz tries to create an instance of the class TestJob, I get this error:

[scheduler_QuartzSchedulerThread] ERROR core.ErrorLogger.schedulerError(2360) | An error occured instantiating job to be
 executed. job= 'TEST_JOB.6d2e7ca2-20cd-4e5f-9f32-1626c7128a5d'
org.quartz.SchedulerException: Problem instantiating class 'com.scheduler.TestJob' -  [See nes
ted exception: java.lang.AbstractMethodError: org.springframework.scheduling.quartz.AdaptableJobFactory.newJob(Lorg/quar
tz/spi/TriggerFiredBundle;Lorg/quartz/Scheduler;)Lorg/quartz/Job;]
        at org.quartz.core.JobRunShell.initialize(JobRunShell.java:141)
        at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:381)
Caused by: java.lang.AbstractMethodError: org.springframework.scheduling.quartz.AdaptableJobFactory.newJob(Lorg/quartz/s
pi/TriggerFiredBundle;Lorg/quartz/Scheduler;)Lorg/quartz/Job;
        at org.quartz.core.JobRunShell.initialize(JobRunShell.java:134)
        ... 1 more

Any ideas on how to get around this?

+5
source share
3 answers

Quartz 2 and Spring 3.1 are not compatible. This way you can either upgrade to Spring 3.1 or upgrade to Quartz 1.8. Or you drop the Spring Quartz adapters and use Quartz 2 manually. I recommend the very first method.

+10

jobFactory factory "SimpleJobFactory"

+2

I had a very similar problem that brought me here, caused by refactoring the job package - everything worked until it was deployed to the cluster. Quartz jdbc uses tables with a job_name column with the old package saved, so it was suffocating from the same error. Delete the remaining trigger lines or return them to where you needed to solve.

+1
source

All Articles