---
title: "疑问:Spring配置Quartz例子出错,请看下.谢谢"
author: "moogle"
date: "2006-12-13T14:35:14Z"
tags: []
categories: ["企业架构"]
slug: "spring-quartz"
draft: false
lastmod: "2006-12-13T14:35:14Z"
id: 38871
url: "https://moogle.iteye.com/blog/38871"
---

研究了一天，在官方论坛也查询了很多，就是锁定不了原因。请各位朋友帮忙看看
spring的配置如下:

```

    <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>  

```

其中被调度的bean

```

public class EmailJobBean extends QuartzJobBean {

	protected void executeInternal(JobExecutionContext arg0)
			throws JobExecutionException {
		System.out.println("Quartz !!!");
	}

}

```


启动后就保错

14:29:38,11882 ERROR   Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzScheduler' defined in ServletContext resource : Invocation of init method failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery. 
不知道有没有朋友遇到过类似问题？请大家指点
环境我用的是resin2.1.16,jdk1.4.2,spring2.0.1,quartz1.6.0