In my web application, i modify Quartz version 1.6.X to 2.1.1 with spring framework 3.1.0.RELEASE.
this is my XML.
this is my TestJob class.Code:<bean id="schedulerFactoryBean" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="triggers"> <list> <ref bean="simpleTrigger" /> </list> </property> </bean> <bean id="simpleTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"> <property name="jobDetail" ref="testJob"/> <property name="repeatInterval" value="10000"/> </bean> <bean id="testJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> <property name="targetObject" ref="job" /> <property name="targetMethod" value="execute" /> </bean> <bean name="job" class="test.quartz.job.TestJob"/>
when i run with was, i got a error log like this.Code:public class XmlTestJob { public void execute() throws Exception { System.out.println(new Timestamp(System.currentTimeMillis())); } }
When i use just service project, it was used without any problems.Code:2012-01-30 14:24:33.312 [ERROR] 2012-01-30 14:24:33 org.quartz.core.JobRunShell Job DEFAULT.testJob threw an unhandled Exception: java.lang.IncompatibleClassChangeError at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:299) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:111) at org.quartz.core.JobRunShell.run(JobRunShell.java:213) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) [ERROR] 2012-01-30 14:24:33 org.quartz.core.ErrorLogger Job (DEFAULT.testJob threw an exception. org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.IncompatibleClassChangeError] at org.quartz.core.JobRunShell.run(JobRunShell.java:224) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) Caused by: java.lang.IncompatibleClassChangeError at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:299) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:111) at org.quartz.core.JobRunShell.run(JobRunShell.java:213) ... 1 more
But, copy to web project, i got an error.
What is the problem?


Reply With Quote