带有Spring框架的Quartz JobStore

问题描述 投票:13回答:3

我正在使用Spring Framework在Oracle DB上实现Quartz Job Store。我的ApplicationContext.xml在下面

<bean id="driverJob" class="org.springframework.scheduling.quartz.JobDetailBean">
    <property name="jobClass" value="BatchFileCollector" />
</bean>

<bean id="ranchTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
    <property name="jobDetail" ref="driverJob" />
    <property name="startDelay" value="2000" />
    <property name="repeatInterval" value="10000" />
</bean>

<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
    <property name="triggers">
        <list>
            <ref bean="ranchTrigger" />
        </list>
    </property>
    <property name="dataSource">
        <ref bean="dataSource.TEXAN"/>
    </property>
    <property name="applicationContextSchedulerContextKey">
        <value>applicationContext</value>
    </property>
    <property name="autoStartup">
        <value>true</value>
    </property>
    <property name="configLocation" value="classpath:quartz.properties"/>
</bean>

此配置给我以下错误。

Caused by: org.quartz.JobPersistenceException: 

Couldn't store trigger: The job (DEFAULT.driverJob) referenced by the trigger does not exist. 

[See nested exception: org.quartz.JobPersistenceException: The job (DEFAULT.driverJob) referenced by the trigger does not exist.]

我正在使用Spring Framework 2.5.6。我必须升级我的Quartz版本吗?我找不到问题。

感谢您的帮助。

java spring quartz-scheduler
3个回答
13
投票

2
投票

0
投票
© www.soinside.com 2019 - 2024. All rights reserved.