05-02 16:12:25.606 [ERROR] org.quartz.core.ErrorLogger - [color=red]An error occured instantiating job to be executed. job=[/color] 'DEFAULT.scanBankJob'
[color=red][/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[/color] 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
[color=green]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. [/color]
我使用的是: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则也会报此错误信息
[color=red][/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[/color] 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
[color=green]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. [/color]
我使用的是: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则也会报此错误信息
本文探讨了Quartz与Spring版本不一致导致的错误,并提供了解决方案。具体表现为使用Quartz 1.5.2与Spring 2.5时出现NoSuchMethodError异常。通过升级Quartz版本至1.6.0并调整相关配置,可以有效解决此类问题。

被折叠的 条评论
为什么被折叠?



