Results 1 to 3 of 3

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

Threaded View

  1. #1
    Join Date
    Jun 2008
    Posts
    10

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

    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 :-
    Code:
    <bean id="reportsQueue" class="com.smart.ui.reports.ReportsQueue" />
    	
    	<bean id="generateReportsJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean" lazy-init="false">
    		<property name="targetObject" ref="reportsQueue" />
    		<property name="targetMethod" value="generateReports" />
    	</bean>
    	
    	<bean name="cronTriggerJob" class="org.springframework.scheduling.quartz.CronTriggerBean">
    		<property name="jobDetail" ref="generateReportsJob"/>
    		<property name="cronExpression" value="0/1 * * * * "/>
    	</bean>
    	
    	<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
    		  <property name="triggers">
    				<list>
    					<ref bean="cronTriggerJob" />
    				</list>
    		  </property>
    	</bean>
    When I start up my application, I get the following exception report :-
    Code:
    java.lang.NoSuchMethodError: org.quartz.Scheduler.setJobFactory(Lorg/quartz/spi/JobFactory  V
    	at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:592)
    ...
    ...
    ...
    The ReportsQueue class extends QuartzJobBean and for now does not implement any interfaces. The methods present in ReportsQueue are :-
    Code:
    public void executeInternal(JobExecutionContext context) 
    throws JobExecutionException {}
    and
    Code:
    public void generateReports(){}
    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.
    Last edited by jarkalam; Jun 20th, 2008 at 08:06 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •