Announcement Announcement Module
Collapse
No announcement yet.
IncompatibleClassChangeError with MethodInvokingJobDetailFactoryBean Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • IncompatibleClassChangeError with MethodInvokingJobDetailFactoryBean

    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.
    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"/>
    this is my TestJob class.
    Code:
    public class XmlTestJob {
    	public void execute() throws Exception {
    		System.out.println(new Timestamp(System.currentTimeMillis()));
    	}
    }
    when i run with was, i got a error log like this.
    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
    When i use just service project, it was used without any problems.
    But, copy to web project, i got an error.
    What is the problem?
    Last edited by plane11; Jan 30th, 2012, 01:29 AM.

  • #2
    Hi,

    I had a similar problem and downgrading version of quartz used to 1.8.5 solved the problem even if in spring 3.1 changelog they claim
    to have supporto for quartz 2.0.
    Also, another problem that I had was that jobs are repeated 3 times instead of just one. This is giving me strong headeaches...:-)))

    Comment

    Working...
    X