Announcement Announcement Module
Collapse
No announcement yet.
Null Ptr Exception when using SchedulerFactoryBean Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Null Ptr Exception when using SchedulerFactoryBean

    I am using Spring 1.2.8 with JDK1.5 and am running into
    a puzzling Null Ptr Exception shown below while using
    scheduling factory.

    I am scheduling a Job using Quartz (1.5.2) and am extending
    Spring's CronTriggerBean:

    <bean id="myTimer" class="myCronTrigger">
    <property name="jobDetail">
    <ref local="job" />
    </property>
    </bean>
    ^M
    <bean id="schedulerFactory" class="org.springframework.scheduling.quartz.Sched ulerFactoryBean">
    <property name="triggers">
    <list>
    <ref local="myTimer" />
    </list>
    </property>
    </bean>

    A BeanCreationException is caused with the following
    root cause. Its not clear what could be causing this null ptr exception.
    Can you offer any hints?

    java.lang.NullPointerException
    at org.quartz.CronTrigger.getTimeAfter(CronTrigger.ja va:857)
    at org.quartz.CronTrigger.getFireTimeAfter(CronTrigge r.java:58
    7)
    at org.quartz.CronTrigger.computeFirstFireTime(CronTr igger.jav
    a:836)
    at org.quartz.core.QuartzScheduler.scheduleJob(Quartz Scheduler
    .java:646)
    at org.quartz.impl.StdScheduler.scheduleJob(StdSchedu ler.java:
    249)
    at org.springframework.scheduling.quartz.SchedulerFac toryBean.
    addTriggerToScheduler(SchedulerFactoryBean.java:81 2)
    at org.springframework.scheduling.quartz.SchedulerFac toryBean.
    registerJobsAndTriggers(SchedulerFactoryBean.java: 706)
    at org.springframework.scheduling.quartz.SchedulerFac toryBean.
    afterPropertiesSet(SchedulerFactoryBean.java:524)
    at org.springframework.beans.factory.support.Abstract AutowireC
    apableBeanFactory.invokeInitMethods(AbstractAutowi reCapableBeanFactory
    .java:1091)
    at org.springframework.beans.factory.support.Abstract AutowireC
    apableBeanFactory.createBean(AbstractAutowireCapab leBeanFactory.java:3
    96)
    at org.springframework.beans.factory.support.Abstract BeanFacto
    ry.getBean(AbstractBeanFactory.java:233)
    //...

    Thanks,

    Ur
Working...
X