-
问题描述
使用定时任务quartz 框架集成PostgreSQL 时,项目启动报错:org.quartz.JobPersistenceException: Couldn’t retrieve trigger: 不良的类型值 long : \x [See nested exception: org.postgresql.util.PSQLException: 不良的类型值 long : \x]
-
错误分析:数据库不兼容(具体原因没有深入研究)
-
解决办法:在quartz配置类或配置文件,添加下列配置
Properties prop = new Properties();
//PostgreSQL数据库,需要添加此配置
prop.put("org.quartz.jobStore.driverDelegateClass", "org.quartz.impl.jdbcjobstore.PostgreSQLDelegate");