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 :-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>
The ReportsQueue class extends QuartzJobBean and for now does not implement any interfaces. The methods present in ReportsQueue are :-Code:java.lang.NoSuchMethodError: org.quartz.Scheduler.setJobFactory(Lorg/quartz/spi/JobFactory V at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:592) ... ... ...
andCode:public void executeInternal(JobExecutionContext context) throws JobExecutionException {}
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.Code:public void generateReports(){}
Cheers,
Raj.


Reply With Quote