疑问:Spring配置Quartz例子出错,请看下.谢谢

本文描述了一个关于 Spring 框架中 Quartz 定时任务配置的问题,作者使用了特定版本的 Resin、JDK、Spring 和 Quartz,但在启动过程中遇到了错误,涉及到无法获取数据库锁的情况。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

研究了一天,在官方论坛也查询了很多,就是锁定不了原因。请各位朋友帮忙看看
spring的配置如下:
[code]
<bean id="emailJobBean" class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass" value="EmailJobBean"/>
</bean>
<bean id="simpleTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<property name="jobDetail" ref="emailJobBean" />
<property name="startDelay" value="2000" />
<property name="repeatInterval" value="60000" />
</bean>
<bean name="quartzScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="simpleTrigger"/>
</list>
</property>
</bean>
[/code]
其中被调度的bean
[code]
public class EmailJobBean extends QuartzJobBean {

protected void executeInternal(JobExecutionContext arg0)
throws JobExecutionException {
System.out.println("Quartz !!!");
}

}
[/code]

启动后就保错
[code]
14:29:38,11882 ERROR [org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:205)] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzScheduler' defined in ServletContext resource [/WEB-INF/classes/spring-quartz.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
[/code]
不知道有没有朋友遇到过类似问题?请大家指点
环境我用的是resin2.1.16,jdk1.4.2,spring2.0.1,quartz1.6.0
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值