Hello,

I'm trying to setup Quartz in a cluster using the Spring integration framework for Quartz. I've set up the basics using the examples in the Spring tutorial, but I need to go one step further by configuring for usage in a cluster. This entails using LocalDataSourceJobStore backed by Oracle 10g. I think I have everything configured, but I'm seeing org.quartz.impl.jdbcjobstore.LockException during startup. Based on my configurations and the exception below, is there anything blatantly wrong that I'm doing? Or is there somthing I'm missing?

quartz.properties
#================================================= =============
#Configure Main Scheduler Properties
#================================================= =============
org.quartz.scheduler.instanceName = TestScheduler1
org.quartz.scheduler.instanceId = dev1
#================================================= =============
#Configure ThreadPool
#================================================= =============
org.quartz.threadPool.class = org.springframework.scheduling.quartz.SimpleThread PoolTaskExecutor
org.quartz.threadPool.threadCount = 5
org.quartz.threadPool.threadPriority = 5
#================================================= =============
#Configure JobStore
#================================================= =============
org.quartz.jobStore.misfireThreshold = 60000
org.quartz.jobStore.class = org.springframework.scheduling.quartz.LocalDataSou rceJobStore
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
org.quartz.jobStore.tablePrefix = QRTZ_
org.quartz.jobStore.isClustered = true
org.quartz.jobStore.clusterCheckinInterval = 20000

Bean Definitions

<bean id="schedulerDataSource" class="org.springframework.jndi.JndiObjectFactoryB ean">
<property name="jndiName">
<value>java:comp/env/jdbc/scheduler</value>
</property>
</bean>

<bean name="exampleJob" class="org.springframework.scheduling.quartz.JobDe tailBean">
<property name="jobClass" value="com.amg.condenet.community.media.service.Ex ampleJob" />
<property name="jobDataAsMap">
<map>
<entry key="timeout" value="5" />
</map>
</property>
</bean>

<bean name="exampleBusinessObject" class="com.amg.condenet.community.media.service.Ex ampleBusinessObject">
</bean>

<bean id="jobDetail" class="org.springframework.scheduling.quartz.Metho dInvokingJobDetailFactoryBean">
<property name="targetObject" ref="exampleBusinessObject" />
<property name="targetMethod" value="doIt" />
</bean>

<bean id="simpleTrigger" class="org.springframework.scheduling.quartz.Simpl eTriggerBean">
<!-- see the example of method invoking job above -->
<property name="jobDetail" ref="jobDetail" />
<!-- 10 seconds -->
<property name="startDelay" value="10000" />
<!-- repeat every 50 seconds -->
<property name="repeatInterval" value="50000" />
</bean>

<bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronT riggerBean">
<property name="jobDetail" ref="exampleJob" />
<!-- run every morning at 6 AM -->
<property name="cronExpression" value="* 0 * * * ?" />
</bean>

<bean class="org.springframework.scheduling.quartz.Sched ulerFactoryBean">
<property name="triggers">
<list>
<ref bean="cronTrigger" />
<ref bean="simpleTrigger" />
</list>
</property>
<property name="dataSource" ref="schedulerDataSource" />
</bean>

Exception From Log

2,115] [SoapConnectorThreadPool : 2] ERROR org.springframework.web.context.Conte
xtLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean wit
h name 'org.springframework.scheduling.quartz.SchedulerFa ctoryBean' defined in S
ervletContext resource [/WEB-INF/conf/spring/spring-quartz.xml]: Invocation of i
nit method failed; nested exception is org.quartz.impl.jdbcjobstore.LockExceptio
n: Failure obtaining db row lock: ORA-01002: fetch out of sequence
[See nested exception: java.sql.SQLException: ORA-01002: fetch out of sequence
]
Caused by:
org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: ORA-0
1002: fetch out of sequence
[See nested exception: java.sql.SQLException: ORA-01002: fetch out of sequence
]
at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.o btainLock(StdRowLoc
kSemaphore.java:155)
at org.quartz.impl.jdbcjobstore.JobStoreCMT.storeJob( JobStoreCMT.java:30
7)
at org.quartz.core.QuartzScheduler.addJob(QuartzSched uler.java:687)
at org.quartz.impl.StdScheduler.addJob(StdScheduler.j ava:261)
at org.springframework.scheduling.quartz.SchedulerFac toryBean.addJobToSc
heduler(SchedulerFactoryBean.java:811)
at org.springframework.scheduling.quartz.SchedulerFac toryBean.addTrigger
ToScheduler(SchedulerFactoryBean.java:834)
at org.springframework.scheduling.quartz.SchedulerFac toryBean.registerJo
bsAndTriggers(SchedulerFactoryBean.java:770)
at org.springframework.scheduling.quartz.SchedulerFac toryBean.afterPrope
rtiesSet(SchedulerFactoryBean.java:593)
at org.springframework.beans.factory.support.Abstract AutowireCapableBean
Factory.invokeInitMethods(AbstractAutowireCapableB eanFactory.java:957)
at org.springframework.beans.factory.support.Abstract AutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBean Factory.java:924)
at org.springframework.beans.factory.support.Abstract AutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFact ory.java:415)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getOb
ject(AbstractBeanFactory.java:245)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:1 41)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean
(AbstractBeanFactory.java:242)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean
(AbstractBeanFactory.java:156)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactor y.java:301)
at org.springframework.context.support.AbstractApplic ationContext.refres
h(AbstractApplicationContext.java:348)
at org.springframework.web.context.support.AbstractRe freshableWebApplica
tionContext.refresh(AbstractRefreshableWebApplicat ionContext.java:156)
at org.springframework.web.context.ContextLoader.crea teWebApplicationCon
text(ContextLoader.java:246)
at org.springframework.web.context.ContextLoader.init WebApplicationConte
xt(ContextLoader.java:184)