开发者社区> 问答> 正文

定时任务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

展开
收起
爱吃鱼的程序员 2020-06-10 14:11:21 1069 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    com.xwtec.quartz.HNExtractAuditRPTData类中有定义act方法吗
    本地不爆错,有的<beanname="methodHNExtractAuditRPTData"
        class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
        <propertyname="targetObject">
          <refbean="HNExtractAuditRPTData"/>
        </property>
        <propertyname="targetMethod">
          <value>act</value>
        </property>
      </bean>

    2020-06-10 14:11:39
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
云栖社区特邀专家徐雷Java Spring Boot开发实战系列课程(第20讲):经典面试题与阿里等名企内部招聘求职面试技巧 立即下载
微服务架构模式与原理Spring Cloud开发实战 立即下载
阿里特邀专家徐雷Java Spring Boot开发实战系列课程(第18讲):制作Java Docker镜像与推送到DockerHub和阿里云Docker仓库 立即下载

相关实验场景

更多