javascript
java quartz 2.2.3_java – Spring 3 Quartz 2错误
當(dāng)我用Quartz 2使用Spring 3時(shí),我收到以下錯誤。有人知道原因嗎?
錯誤:
Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.springframework.scheduling.quartz.JobDetailBean] for bean with name 'job' defined in class path resource [beans.xml]: problem with class file or dependent class; nested exception is java.lang.IncompatibleClassChangeError: class org.springframework.scheduling.quartz.JobDetailBean has interface org.quartz.JobDetail as super class
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1253)
Spring配置文件:
public class ExampleJob extends QuartzJobBean {
private int timeout;
/**
* Setter called after the ExampleJob is instantiated
* with the value from the JobDetailBean (5)
*/
public void setTimeout(int timeout) {
this.timeout = timeout;
}
@Override
protected void executeInternal(JobExecutionContext ctx)
throws JobExecutionException {
*****
}
}
總結(jié)
以上是生活随笔為你收集整理的java quartz 2.2.3_java – Spring 3 Quartz 2错误的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [转]remote object /da
- 下一篇: 相对不容易用计算机语言编程实现的是,在描