日期:2014-05-19  浏览次数:20647 次

Quartz定时器
[code=XML]
      <?xml   version= "1.0 "   encoding= "UTF-8 "?>
<beans   xmlns= "http://www.springframework.org/schema/beans "
xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance "
xmlns:aop= "http://www.springframework.org/schema/aop "
xsi:schemaLocation= "http://www.springframework.org/schema/beans
                      http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                      http://www.springframework.org/schema/aop
                      http://www.springframework.org/schema/aop/spring-aop-2.5.xsd ">
                     
<bean   id= "timer "   class= "com.timeftp.Timer "> </bean>

<bean   id= "reportTask "   class= "org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean ">
<property   name= "targetObject "   ref= "timer "   />
<property   name= "targetMethod "   value= "callFTP "   />
</bean>

<bean   id= "cronTigger "   class= "org.springframework.scheduling.quartz.CronTriggerBean ">
<property   name= "jobDetail "   ref= "reportTask "   />
<property   name= "cronExpression "   value= "0   *   15   *   *   ? "/>
</bean>

<bean   id= "scheduler "   class= "org.springframework.scheduling.quartz.SchedulerFactoryBean ">
<property   name= "triggers ">
<list>
<ref   bean= "cronTigger "/>
</list>
</property>
</bean>
</beans>
[/code]


为什么它会报这个异常信息
[code=XML]

2012-4-6   16:21:05   org.springframework.context.support.AbstractApplicationContext   prepareRefresh
信息:   Refreshing   org.springframework.context.support.ClassPathXmlApplicationContext@ecd7e:   display   name   [org.springframework.context.support.ClassPathXmlApplicationContext@ecd7e];   startup   date   [Fri   Apr   06   16:21:05   CST   2012];   root   of   context   hierarchy
2012-4-6   16:21:05   org.springframework.beans.factory.xml.XmlBeanDefinitionReader   loadBeanDefinitions
信息:   Loading   XML   bean   definitions   from   class   path   resource   [applicationContext.xml]
2012-4-6   16:21:05   org.springframework.context.support.AbstractApplicationContext   obtainFreshBeanFactory
信息:   Bean   factory   for   application   context   [org.springframework.context.support.ClassPathXmlApplicationContext@ecd7e]:   org.springframework.beans.factory.support.DefaultListableBeanFactory@4aa0ce
2012-4-6   16:21:05   org.springframework.beans.factory.support.DefaultListableBeanFactory   preInstantiateSingletons
信息:   Pre-instantiating   singletons   in   org.springframework.beans.factory.support.DefaultListableBeanFactory@4aa0ce:   defining   beans   [timer,reportTask,cronTigger,scheduler];   root   of