首页 > 解决方案 > 为什么石英无法创建/删除作业?

问题描述

需要修复 Spring 应用程序中一些不会在本地出现的石英相关异常。

org.quartz.JobPersistenceException: Couldn't remove job: ERROR: update or delete on table "qrtz_job_details" violates foreign key constraint "qrtz_triggers_sched_name_fkey" on table "qrtz_triggers"
  Detail: Key (sched_name, job_name, job_group)=(job_creator, jobKind:112518, DEFAULT) is still referenced from table "qrtz_triggers". [See nested exception: org.postgresql.util.PSQLException: ERROR: update or delete on table "qrtz_job_details" violates foreign key constraint "qrtz_triggers_sched_name_fkey" on table "qrtz_triggers"
  Detail: Key (sched_name, job_name, job_group)=(job_creator, jobKind:112518, DEFAULT) is still referenced from table "qrtz_triggers".]

org.quartz.JobPersistenceException: Couldn't store trigger 'DEFAULT.jobKind:112509' for 'DEFAULT.jobKind:112509' job:ERROR: insert or update on table "qrtz_triggers" violates foreign key constraint "qrtz_triggers_sched_name_fkey"
  Detail: Key (sched_name, job_name, job_group)=(job_creator, jobKind:112509, DEFAULT) is not present in table "qrtz_job_details". [See nested exception: org.postgresql.util.PSQLException: ERROR: insert or update on table "qrtz_triggers" violates foreign key constraint "qrtz_triggers_sched_name_fkey"
  Detail: Key (sched_name, job_name, job_group)=(job_creator, jobKind:112509, DEFAULT) is not present in table "qrtz_job_details".]]

在存储触发器/删除作业时,似乎作业和触发器之间存在某种不同步。有没有人遇到过这样的问题?查看提到的表时,所有记录/约束都匹配

标签: javaspringpostgresqlquartz-scheduler

解决方案


推荐阅读