首页

发表评论

 

Avatar: ellen

Re: 在Spring中使用Quartz任务调度支持集群

啊,前辈,刚才那个问题莫名其妙就没了。现在是另外一个问题,我的xml定义的contrigger是这样的: 在applicationContext.xml里: <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="configLocation" value="/WEB-INF/quartz.properties" /> <property name="triggers"> <list> <ref bean="cronTertioRespParseTrigger" /> </list> </property> </bean> 然后在具体模块的xml里定义了: <bean id="cronTertioRespParseTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail"> <bean class="com.foss.main.customObject.MyMethodInvokingJobDetailFactoryBean"> <property name="targetObject" ref="terRspParseCronService" /> <property name="targetMethod" value="processFiles" /> <!-- <property name="concurrent"><value>false</value></property> --> </bean> </property> <property name="volatility"><value>true</value></property> <property name="cronExpression"> <value>0 0/5 * * * ?</value> </property> </bean> 现在的问题是,当weblogic server起来后,报: 2008-10-08 16:40:00,107 org.quartz.core.JobRunShell.run(JobRunShell.java:202) - Calling execute on job DEFAULT.com.foss.main.customObject.MyMethodInvokingJobD etailFactoryBean#308737 2008-10-08 16:40:00,117 org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFact oryBean.java:242) - Could not invoke method 'null' on target object [null] java.lang.IllegalStateException: prepare() must be called prior to invoke() on MethodInvoker at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:267) at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java: 224) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:203) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) 2008-10-08 16:40:00,157 org.quartz.core.JobRunShell.run(JobRunShell.java:208) - Job DEFAULT.com.foss.main.customObject.MyMethodInvokingJobDetailFactoryBean#30 8737 threw a JobExecutionException: org.quartz.JobExecutionException: Could not invoke method 'null' on target object [null] [See nested exception: java.lang.IllegalStateException: prepare() mus t be called prior to invoke() on MethodInvoker] 其中,MyMethodInvokingJobDetailFactoryBean是我wripper的MethodInvokingJobDetailFactoryBean 是不是我xml里config的job不对呢?请前辈指教

Re: 在Spring中使用Quartz任务调度支持集群


标题
正文
HTML : b, strong, i, em, blockquote, br, p, pre, a href="", ul, ol, li, sub, sup
OpenID Login
姓名
电子邮件
网站
记住我 是  否 

电邮地址不会公开在网页上,您留下的电子邮件仅用于本文有新评论时通知您(以后可以随时拿掉)。