请教兽总一个问题,我用 quartz 做调度任务, 在web.xml 用 listener 引入并 初始化 SchedulerFactory,初始化成功了,但是 在 到时间点 该执行的时候 就报错了,报错内容如下
701910 [DefaultQuartzScheduler_Worker-2] ERROR org.quartz.core.ErrorLogger - Unable to notify JobListener(s) of Job to be executed: (Job will NOT be executed!). trigger= export-group.trigger1 job= export-group.exportWeek-job
org.quartz.SchedulerException: JobListener 'SchedulerTaskStatusListener' threw exception: null [See nested exception: java.lang.NullPointerException]
at org.quartz.core.QuartzScheduler.notifyJobListenersToBeExecuted(QuartzScheduler.java:1875)
at org.quartz.core.JobRunShell.notifyListenersBeginning(JobRunShell.java:338)
at org.quartz.core.JobRunShell.run(JobRunShell.java:180)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:548)
Caused by: java.lang.NullPointerException
at com.venustech.tsoc.cupid.schedule.CupidJobListener.jobToBeExecuted(SourceFile:26)
at org.quartz.core.QuartzScheduler.notifyJobListenersToBeExecuted(QuartzScheduler.java:1873)
... 3 more
请兽总 看下 原因,我不启动项目 在 main 方法测试 是没问题的