Samaritan
Nov 24th, 2006, 10:36 AM
Hi,
I'm trying to cofigure job (using Quartz) on String 2.0 RC2.
I wrote the conf following the docs. Here my xml:
<bean id="emailDownloadJob" class="org.springframework.scheduling.quartz.MethodInvoki ngJobDetailFactoryBean">
<property name="targetObject" ref="emailManager" />
<property name="targetMethod" value="readAccounts" />
</bean>
<bean id="emailDownloadTrigger" class="org.springframework.scheduling.quartz.SimpleTrigge rBean">
<property name="jobDetail" ref="emailDownloadJob" />
<property name="startDelay" value="10000" />
<property name="repeatInterval" value="60000" />
</bean>
<bean class="org.springframework.scheduling.quartz.SchedulerFac toryBean" autowire="no">
<property name="triggers">
<list>
<ref bean="emailDownloadTrigger" />
</list>
</property>
</bean>
But this doen't works:
2006-11-24 16:01:02,754 - ERROR - org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.scheduling.quartz.SchedulerFa ctoryBean' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.quartz.SchedulerException: Registration of jobs and triggers failed: null [See nested exception: java.lang.NullPointerException]
Caused by:
org.quartz.SchedulerException: Registration of jobs and triggers failed: null [See nested exception: java.lang.NullPointerException]
at org.springframework.scheduling.quartz.SchedulerFac toryBean.registerJobsAndTriggers(SchedulerFactoryB ean.java:766)
at org.springframework.scheduling.quartz.SchedulerFac toryBean.afterPropertiesSet(SchedulerFactoryBean.j ava:570)
This happens because string doesn't set the trigger jobDetail property but, how it can if MethodInvokingJobDetailFactoryBean doen's extends JobDetail ?
Can someone give me some info ?
Thx in advance,
Fabio
I'm trying to cofigure job (using Quartz) on String 2.0 RC2.
I wrote the conf following the docs. Here my xml:
<bean id="emailDownloadJob" class="org.springframework.scheduling.quartz.MethodInvoki ngJobDetailFactoryBean">
<property name="targetObject" ref="emailManager" />
<property name="targetMethod" value="readAccounts" />
</bean>
<bean id="emailDownloadTrigger" class="org.springframework.scheduling.quartz.SimpleTrigge rBean">
<property name="jobDetail" ref="emailDownloadJob" />
<property name="startDelay" value="10000" />
<property name="repeatInterval" value="60000" />
</bean>
<bean class="org.springframework.scheduling.quartz.SchedulerFac toryBean" autowire="no">
<property name="triggers">
<list>
<ref bean="emailDownloadTrigger" />
</list>
</property>
</bean>
But this doen't works:
2006-11-24 16:01:02,754 - ERROR - org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.scheduling.quartz.SchedulerFa ctoryBean' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.quartz.SchedulerException: Registration of jobs and triggers failed: null [See nested exception: java.lang.NullPointerException]
Caused by:
org.quartz.SchedulerException: Registration of jobs and triggers failed: null [See nested exception: java.lang.NullPointerException]
at org.springframework.scheduling.quartz.SchedulerFac toryBean.registerJobsAndTriggers(SchedulerFactoryB ean.java:766)
at org.springframework.scheduling.quartz.SchedulerFac toryBean.afterPropertiesSet(SchedulerFactoryBean.j ava:570)
This happens because string doesn't set the trigger jobDetail property but, how it can if MethodInvokingJobDetailFactoryBean doen's extends JobDetail ?
Can someone give me some info ?
Thx in advance,
Fabio