NutzCN Logo
问答 关于 quartz 的问题
发布于 2662天前 作者 qq_5119e32c 3181 次浏览 复制 上一个帖子 下一个帖子
标签: quartz

请教兽总一个问题,我用 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 方法测试 是没问题的

1 回复

jobToBeExecuted的方法里面的什么东西空指针了

添加回复
请先登陆
回到顶部