在人人的后台管理框架下,写了自己的定时任务,然后通过后台管理添加后,点击立即执行失败,提示:立即执行定时任务失败。
截图如下:
全局搜索这句提示,发现在抛出这个异常时,没有打印错误堆栈信息,于是改代码,把堆栈打印下,报错如下:
org.quartz.JobPersistenceException: Couldn't store trigger 'DEFAULT.MT_2i1de9ktmai5i' for 'DEFAULT.TASK_5' job:The job (DEFAULT.TASK_5) referenced by the trigger does not exist. [See nested exception: org.quartz.JobPersistenceException: The job (DEFAULT.TASK_5) referenced by the trigger does not exist.]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1228)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$4.executeVoid(JobStoreSupport.java:1164)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$VoidTransactionCallback.execute(JobStoreSupport.java:3765)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$VoidTransactionCallback.execute(JobStoreSupport.java:3763)
at org.quartz.impl.jdbcjobstore.JobStoreCMT.executeInLock(JobStoreCMT.java:245)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1160)
at org.quartz.core.QuartzScheduler.triggerJob(QuartzScheduler.java:1156)
at org.quartz.impl.StdScheduler.triggerJob(StdScheduler.java:341)
at com.liandu.modules.job.utils.ScheduleUtils.run(ScheduleUtils.java:118)
at com.liandu.modules.job.service.impl.ScheduleJobServiceImpl.run(ScheduleJobServiceImpl.java:107)
at com.liandu.modules.job.service.impl.ScheduleJobServiceImpl$$FastClassBySpringCGLIB$$c33bef66.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:769)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
at org.springframework.transaction.interceptor.TransactionInterceptor$$Lambda$748/220824886.proceedWithInvocation(Unknown Source)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:366)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:99)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framew