gpt4 book ai didi

java - org.quartz.JobPersistenceException : Couldn't acquire next trigger: ERROR: null value in column "sched_time" violates not-null constraint,

转载 作者:行者123 更新时间:2023-11-29 13:52:45 33 4
gpt4 key购买 nike

import static org.quartz.JobBuilder.newJob;

import org.quartz.CronScheduleBuilder;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.Trigger;
import org.quartz.TriggerBuilder;
import org.quartz.impl.StdSchedulerFactory;
import static org.quartz.SimpleScheduleBuilder.*;

public class QuartzTest {
public static void main(String[] args) {
try {
Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler();
JobDetail jobDetail = newJob(HelloJob.class).withIdentity("Hello Job").build();
Trigger trigger = TriggerBuilder
.newTrigger()
.withIdentity("dummyTriggerName", "group1")
.withSchedule(
/*CronScheduleBuilder.cronSchedule("0/5 * * * * ?")*/
simpleSchedule().
withIntervalInSeconds(15).
repeatForever()
)
.build();
// and start it off
scheduler.start();
scheduler.scheduleJob(jobDetail, trigger);
// scheduler.shutdown();
} catch (SchedulerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

错误:

org.quartz.JobPersistenceException: Couldn't acquire next trigger: ERROR: null value in column "sched_time" violates not-null constraint Detail: Failing row contains (StepScheduler, NON_CLUSTERED1466000944643, dummyTriggerName, group1, NON_CLUSTERED, 1466015299949, null, 5, ACQUIRED, null, null, f, f). [See nested exception: org.postgresql.util.PSQLException: ERROR: null value in column "sched_time" violates not-null constraint Detail: Failing row contains (DecisionIQStepScheduler, NON_CLUSTERED1466000944643, dummyTriggerName, group1, NON_CLUSTERED, 1466015299949, null, 5, ACQUIRED, null, null, f, f).]

有人可以帮我解决这个问题吗?

最佳答案

这是由于 quartz-scheduler.jar 和 SQL 模式文件之间的版本不匹配。

关于java - org.quartz.JobPersistenceException : Couldn't acquire next trigger: ERROR: null value in column "sched_time" violates not-null constraint,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37843145/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com