转载自:
http://hithoper.blog.hexun.com/44424458_d.html
今天在SPRING上配置一个QUARTZ来做定时任务,
配置好了,启动程序,老是报如下错误:
11:03:05,296 INFO [STDOUT] 02-22 11:03:05 [ERROR] org.springframework.web.context.ContextLoader initWebApplicationContext org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:211) - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SmsSendTaskFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext-quartz.xml]: Initialization of bean 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
[See nested exception: java.sql.SQLException: ORA-00942: table or view does not exist
]]
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
[See nested exception: java.sql.SQLException: ORA-00942: table or view does not exist
]]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.initialize(JobStoreSupport.java:493)
at org.quartz.impl.jdbcjobstore.JobStoreCMT.initialize(JobStoreCMT.java:144)
难道我的DAO里面的程序有问题,表名写错了?
原来是因为applicationContext-quartz.xml配置文件里面的
<beans default-autowire="byName">
<bean id="SmsSendTaskFactory"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="messageTaskScheduledTask" />
</list>
</property>
<property name="configLocation"
value="classpath:quartz.properties" />
</bean>
看看SchedulerFactoryBean里面的源代码,它会用datasource连接数据库,去取数据库里面的任务,然后又找不到表名。所以报错。
看来这个autowire byName不能乱用啊。
把这个default-autowire="byName"去掉,老实的配置SPRING的BEAN就正确了。
分享到:
相关推荐
postgres quatrz初始化sql...#org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
org.quartz.tool包源码,使用方法请搜索《 quartz-2.2.1定制工具类,方便nutz使用js配置quartz》
Autofac.Extras.Quartz, Quartz.Net的Autofac集成 Autofac.Extras.Quartz用于 Quartz.Net的Autofac集成包。Autofac.Extras.Quartz 为每个石英作业创建嵌套的litefime作用域。 完成作业执行后释放嵌套作用域。这允许...
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX org.quartz.jobStore.tablePrefix = QRTZ_ org.quartz.jobStore.dataSource = qzDS #集群模式 #org.quartz.jobStore.isClustered = true #org...
NULL 博文链接:https://wilian.iteye.com/blog/1992365
注:下文中的 *** 代表文件名中的组件名称。 # 包含: 中文-英文对照文档:【***-javadoc-API文档-中文(简体)-英语-对照版.zip】 jar包下载地址:【***.jar下载地址(官方地址+国内镜像地址).txt】 ...
Packages ...com.kingdee.bos.support.quartz.impl com.kingdee.bos.tcpmonitor com.kingdee.bos.tcpmonitor.ui com.kingdee.bos.transaction com.kingdee.bos.transaction.EJBTxFacade ...
spring 3.0 报错:Caused by: java.lang.InstantiationError: org.quartz.JobDetail 换成这个包 就可以了
Maven坐标:org.quartz-scheduler:quartz:2.3.0; 标签:scheduler、quartz、jar包、java、中文文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的...
Maven坐标:org.quartz-scheduler:quartz:2.3.2; 标签:quartz、scheduler、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的...
jar包,官方版本,自测可用
赠送jar包:quartz-1.6.1.jar; 赠送原API文档:quartz-1.6.1-javadoc.jar; 包含翻译后的API文档:quartz-1.6.1-javadoc-API文档-中文(简体)版.zip 对应Maven信息:groupId:org.opensymphony.quartz,...
Maven坐标:org.quartz-scheduler:quartz:2.3.2; 标签:scheduler、quartz、jar包、java、中英对照文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中...
赠送jar包:quartz-1.6.1.jar 赠送原API文档:quartz-1.6.1-javadoc.jar 包含翻译后的API文档:quartz-1.6.1-javadoc-API文档-中文(简体)-英语-对照版.zip 对应Maven信息:groupId:org.opensymphony.quartz,...
Maven坐标:org.quartz-scheduler:quartz:2.3.0; 标签:scheduler、quartz、jar包、java、API文档、中英对照版; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译...
quartz所需jar包,包含以下3个版本。quartz-2.2.1jar、quartz-all-1.8.5jar、quartz-all-1.6.0jar。
网上能找到的Quartz Web管理的资料都是使用的一个国外人写的Quartz WebApp的东东,功能也很全面。但是作为自己的应用其实用不了那么多功能,一般我们只要可以定义一个job,指定一个Cron表达式完成工作即可,附带的...
java集成Quartz所需要的jar包。
quartz内部表.sql。
quartz-all-1.8.4.jar