定时任务quartz,spring报错。

猪的暧昧 发布于 2016/02/19 16:02
阅读 1K+
收藏 0

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

加载中
0
Sminl
Sminl
com.xwtec.quartz.HNExtractAuditRPTData 类中有定义act方法吗
猪的暧昧
猪的暧昧
本地不爆错,有的
0
Happy猪猪
Happy猪猪
<bean name="methodHNExtractAuditRPTData"
        class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
        <property name="targetObject">
            <ref bean="HNExtractAuditRPTData" />
        </property>
        <property name="targetMethod">
            <value>act</value>
        </property>
    </bean>
返回顶部
顶部