定时任务quartz,spring报错。
1.本地tomcat是好使的,不报错。丢到服务器WebLogic就出现这个错误?
<!--湖南:审计报表,取数据用--> <bean id="HNExtractAuditRPTData" class="com.xwtec.quartz.HNExtractAuditRPTData"></bean> <bean id="methodHNExtractAuditRPTData" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> <property name="targetObject"> <ref bean="HNExtractAuditRPTData" /> </property> <property name="targetMethod"> <value>act</value> </property> </bean> <bean id="HNExtractAuditRPTDataCronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail"> <ref bean="methodHNExtractAuditRPTData" /> </property> <property name="cronExpression"> <value>0 59 14 * * ?</value><!--每天凌晨2点10分触发 --> </property> </bean>
2016-02-19 15:11:43.343 ERROR [DefaultQuartzScheduler_Worker-1] Job DEFAULT.methodHNExtractAuditRPTData threw an unhandled Exception: |org.quartz.core.JobRunShell.run(2
11)java.lang.NoSuchMethodError: org/quartz/JobExecutionException.<init>(Ljava/lang/String;Ljava/lang/Exception;Z)V
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:174)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:66)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
2016-02-19 15:11:43.350 ERROR [DefaultQuartzScheduler_Worker-1] Job (DEFAULT.methodHNExtractAuditRPTData threw an exception.|org.quartz.core.ErrorLogger.schedulerError(
2156)org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NoSuchMethodError: org/quartz/JobExecutionException.<init>(Ljava/lang/
String;Ljava/lang/Exception;Z)V] at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
Caused by:
java.lang.NoSuchMethodError: org/quartz/JobExecutionException.<init>(Ljava/lang/String;Ljava/lang/Exception;Z)V
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:174)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:66)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
... 1 more
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
<bean name="methodHNExtractAuditRPTData"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject">
<ref bean="HNExtractAuditRPTData" />
</property>
<property name="targetMethod">
<value>act</value>
</property>
</bean>
本地不爆错,有的
com.xwtec.quartz.HNExtractAuditRPTData 类中有定义act方法吗