Hi everybody,
RAM persistance is working fine with the following context configuration file
Now when I add a dataSource property (using jtds driver to access MS SQLServer 2000),Code:<bean id="schedulerFactoryBean" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> <property name="transactionManager"> <ref bean="transactionManager"/> </property> <property name="target"> <ref local="schedulerFactoryBeanTarget"/> </property> <property name="transactionAttributes"> <props> <prop key="*">PROPAGATION_REQUIRED</prop> </props> </property> </bean> <bean id="schedulerFactoryBeanTarget" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="autoStartup"> <value>false</value> </property> </bean>
got an exception. I might be missing something. Any help would be great.Code:<bean id="schedulerFactoryBeanTarget" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="autoStartup"> <value>false</value> </property> <property name="dataSource"> <ref bean="dataSource"/> </property> </bean>
Thanks in advance,
Gustavo.
Code:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scheduler' defined in class path resource [com/vaau/rbacx/context/test-scheduling-context.xml]: Can't resolve reference to bean 'schedulerFactoryBean' while setting property 'springScheduler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerFactoryBean' defined in class path resource [com/vaau/rbacx/context/test-scheduling-context.xml]: Can't resolve reference to bean 'schedulerFactoryBeanTarget' while setting property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerFactoryBeanTarget' defined in class path resource [com/vaau/rbacx/context/test-scheduling-context.xml]: Initialization of bean failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerFactoryBean' defined in class path resource [com/vaau/rbacx/context/test-scheduling-context.xml]: Can't resolve reference to bean 'schedulerFactoryBeanTarget' while setting property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerFactoryBeanTarget' defined in class path resource [com/vaau/rbacx/context/test-scheduling-context.xml]: Initialization of bean failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerFactoryBeanTarget' defined in class path resource [com/vaau/rbacx/context/test-scheduling-context.xml]: Initialization of bean failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery. org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR. [See nested exception: java.sql.SQLException: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR.]] at org.quartz.impl.jdbcjobstore.JobStoreSupport.initialize(JobStoreSupport.java:504) at org.quartz.impl.jdbcjobstore.JobStoreCMT.initialize(JobStoreCMT.java:150) at org.springframework.scheduling.quartz.LocalDataSourceJobStore.initialize(LocalDataSourceJobStore.java:118) at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:915) at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1047) at org.springframework.scheduling.quartz.SchedulerFactoryBean.createScheduler(SchedulerFactoryBean.java:543) at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:494)
Code:* Nested Exception (Underlying Cause) --------------- java.sql.SQLException: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:367) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2282) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:1747) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:515) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:275) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:644) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.obtainLock(StdRowLockSemaphore.java:142) at org.quartz.impl.jdbcjobstore.JobStoreCMT.cleanVolatileTriggerAndJobs(JobStoreCMT.java:218) at org.quartz.impl.jdbcjobstore.JobStoreSupport.initialize(JobStoreSupport.java:501) at org.quartz.impl.jdbcjobstore.JobStoreCMT.initialize(JobStoreCMT.java:150) at org.springframework.scheduling.quartz.LocalDataSourceJobStore.initialize(LocalDataSourceJobStore.java:118) at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:915) at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1047) at org.springframework.scheduling.quartz.SchedulerFactoryBean.createScheduler(SchedulerFactoryBean.java:543) at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:494) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1065) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:343) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:260) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:221)Code:* Nested Exception (Underlying Cause) --------------- org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR. [See nested exception: java.sql.SQLException: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR.] at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.obtainLock(StdRowLockSemaphore.java:160) at org.quartz.impl.jdbcjobstore.JobStoreCMT.cleanVolatileTriggerAndJobs(JobStoreCMT.java:218) at org.quartz.impl.jdbcjobstore.JobStoreSupport.initialize(JobStoreSupport.java:501) at org.quartz.impl.jdbcjobstore.JobStoreCMT.initialize(JobStoreCMT.java:150) at org.springframework.scheduling.quartz.LocalDataSourceJobStore.initialize(LocalDataSourceJobStore.java:118) at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:915) at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1047) at org.springframework.scheduling.quartz.SchedulerFactoryBean.createScheduler(SchedulerFactoryBean.java:543) at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:494)


Reply With Quote
