日期:2014-05-16  浏览次数:21155 次

Spring中集成Quartz时遭遇Failure obtaining db row lock异常

今天在一个新的项目中用Spring集成Quartz来进行任务调度,和以往一样,配置好JobDetail、Trigger、SchedulerFactoryBean启动,却遭遇到如下异常信息:

[java] view plaincopyprint?
  1. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sfb' defined in URL [jar:file:/.../xxx-biz-service.jar!/bean/spring-task.xml]: Invocation of init method failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: ORA-00942: table or view does not exist
  2. [See nested exception: java.sql.SQLException: ORA-00942: table or view does not exist
  3. ]]
  4. Caused by:
  5. org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: ORA-00942: table or view does not exist
  6. [See nested exception: java.sql.SQLException: ORA-00942: table or view does not exist
  7. ]]
  8. at org.quartz.impl.jdbcjobstore.JobStoreSupport.initialize(JobStoreSupport.java:493)
  9. at org.quartz.impl.jdbcjobstore.JobStoreCMT.initialize(JobStoreCMT.java:144)
  10. at org.springframework.scheduling.quartz.LocalDataSourceJobStore.initialize(LocalDataSourceJobStore.java:133)