quartz1.5.0链接数据库报错java.sql.SQLException: ORA-00904: "PRIORITY": 无效的标识符

Exception in thread "main" org.quartz.JobPersistenceException: Couldn't store trigger: ORA-00904: "PRIORITY": 无效的标识符
[See nested exception: java.sql.SQLException: ORA-00904: "PRIORITY": 无效的标识符
]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1182)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$3.execute(JobStoreSupport.java:984)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$39.execute(JobStoreSupport.java:3590)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3662)
at org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInLock(JobStoreSupport.java:3586)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJobAndTrigger(JobStoreSupport.java:971)
at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:703)
at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:255)
at org.quartz.examples.example1.SimpleExample.run(SimpleExample.java:64)
at org.quartz.examples.example1.SimpleExample.main(SimpleExample.java:91)
Caused by: java.sql.SQLException: ORA-00904: "PRIORITY": 无效的标识符

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
at org.quartz.impl.jdbcjobstore.oracle.OracleDelegate.insertTrigger(OracleDelegate.java:366)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1170)
... 10 more



     好几次遇见这样的问题,百度了一下解决了,首先要知道,标示符无效是因为:数据库表里没有PRIORITY字段

     那可以动脑筋想一下:
     你数据库初始化的脚本和你使用quartz的版本可能是不一致的,导入的jar包是1.6的,而数据库初始化的脚本用的                    是1.5的。

     因为楼主下载了好多版本,最后觉得使用低版本的1.5.0,(是因为旧本本的资料多,其实旧版本也是完全可以满足功能需求的。)
好了问题解决了,最后别忘记,要加数据库驱动的jar包,这是quartz的lib里没有的,还请各位自行解决。



你可能感兴趣的:(任务调度)