`
soundycui
  • 浏览: 82009 次
  • 性别: Icon_minigender_2
  • 来自: 深圳
社区版块
存档分类
最新评论

【错误】spring的定时器quartz

    博客分类:
  • java
 
阅读更多
05-02 16:12:25.606 [ERROR] org.quartz.core.ErrorLogger - An error occured instantiating job to be executed. job= 'DEFAULT.scanBankJob'
[/color]org.quartz.SchedulerException: Problem instantiating class 'com.yinct.schedule.ScanBankSchedule' - [color=red]java.lang.NoSuchMethodError: org.quartz.SchedulerException: method <init>(Ljava/lang/String;Ljava/lang/Throwable;)V not found at org.quartz.core.JobRunShell.initialize(JobRunShell.java:148)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:353)
2012-5-2 16:12:26 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()


参考信息:
http://grails.1312388.n4.nabble.com/Error-about-Quartz-jobs-in-Def-Guide-to-Grails-td1345018.html

I'm not sure, but it looks like a conflict in API between Quartz 1.6.0
(which is supported by Spring 2.5 in Grails 1.0) and Quartz 1.5.x (which was
used in Spring 2.x in earlier versions of Grails). Try upgrading to the
0.3-SNAPSHOT version of the plugin ('grails install-plugin quartz
0.3-SNAPSHOT'), it built against quartz 1.6.0, so at least you'll see the
real exception occured instead of  NoSuchMethod one.


我使用的是:spring2.5+quartz_1.5.2

现修改为:spring2.5+quartz_1.6,成功改过

**这确实能避免错误,但是要找到根本的原因所在
最有可能的情况就是:实时器类的一些包导入冲突造成的
备注:最简单的spring定时器任务,至少要有的jar包
commons-attributes-compiler.jar
commons-collections_3.2.jar
commons-logging.jar
quartz-all-1.6.jar
spring.jar
eg:若需org.apache.commons.logging.LOg,若导成了org.sun.xxx.Log则也会报此错误信息
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics