Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring-Quartz scheduler-CronJob NoSuchMethodError org.quartz. Scheduler.setJobFactory

 
Rajkamal Pillai
Ranch Hand
Posts: 445
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am involved in a project using Spring framework and we need a scheduler to kick of a process at a given interval of time. I am using the following code :-


When I start up my application, I get the following exception report :-



The ReportsQueue class extends QuartzJobBean and for now does not implement any interfaces. The methods present in ReportsQueue are :-

and


Does the Exception occur due to any method I have to implement but am not doing that right now? Any help will be very helpful.

Cheers,
Raj.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of Quartz are you using ?
 
Rajkamal Pillai
Ranch Hand
Posts: 445
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Quartz 1.6.
[ June 21, 2008: Message edited by: Raj Kamal ]
 
Rajkamal Pillai
Ranch Hand
Posts: 445
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I modified existing code from MethodInvokingJobDetailFactoryBean to use the JobDetailBean. I still get the same error on server startup.

After some hair pulling and nail biting I found that the root of the problem was caused from the SchedulerFactoryBean.

I found from the docs that to use the JobDetailBean and its sub-classes the version of Quartz has to be 1.5 or above. Right now I am using the quartz-all-1.6.0.jar and the SchedulerFactoryBean from spring-support-1.2.9.jar.

Is there any version conflict between the classes I am using?



Cheers,
Raj.
 
Rajkamal Pillai
Ranch Hand
Posts: 445
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I feel it was caused by version incompatibility. I gave up on Quartz scheduler and used the Timer. It worked fine. Moving on to weaving another layer now.

Thanks,
Raj.
 
Vaibhav Dalvi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes... There is a conflict. Use jar from "http://www.findjar.com/jar/mule/dependencies/maven2/quartz/quartz-all/1.6.0/quartz-all-1.6.0.jar.html". I use this jar and there are no erros... it is now working...
[ July 24, 2008: Message edited by: Vaibhav Dalvi ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic