org.quartz.JobPersistenceException: Couldn't retrieve trigger: No record found for selection of Trigger with key

错误日志

10-27 07:02:10.948 [QuartzScheduler_quartzScheduler-NON_CLUSTERED_MisfireHandler] INFO  - Handling 1 trigger(s) that missed their scheduled fire-time.
10-27 07:02:10.955 [QuartzScheduler_quartzScheduler-NON_CLUSTERED_MisfireHandler] ERROR - MisfireHandler: Error handling misfires: Couldn't retrieve trigger: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-3eceaeed-58e1-4ca8-ae5e-49630fa5da10' and statement: SELECT * FROM QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'quartzScheduler' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ?
org.quartz.JobPersistenceException: Couldn't retrieve trigger: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-3eceaeed-58e1-4ca8-ae5e-49630fa5da10' and statement: SELECT * FROM QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'quartzScheduler' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ?
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1538)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:984)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3249)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3997)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:4018)
Caused by: java.lang.IllegalStateException: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-3eceaeed-58e1-4ca8-ae5e-49630fa5da10' and statement: SELECT * FROM QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'quartzScheduler' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ?
	at org.quartz.impl.jdbcjobstore.SimpleTriggerPersistenceDelegate.loadExtendedTriggerProperties(SimpleTriggerPersistenceDelegate.java:110)
	at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTrigger(StdJDBCDelegate.java:1819)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1536)
	... 4 common frames omitted

解决方法:

通过以上信息可以看出,找不到key: DEFAULT.6da64b5bd2ee-3eceaeed-58e1-4ca8-ae5e-49630fa5da10, 在qrtz_triggers中发现存在一个Job_Name和出现问题的quartz任务相同的任务名称,对应的TRIGGER_NAME为:6da64b5bd2ee-3eceaeed-58e1-4ca8-ae5e-49630fa5da10,TRIGGER_GROUP为:DEFAULT,删除掉该条记录,重启服务,问题解决

原文地址:https://www.cnblogs.com/qq931399960/p/15470968.html