在工作中,遇到这么一个情况。开发了一个项目,在本地正常运行都是 OK 的。但是在下午将它部署到服务器上后,就抛出了如下异常信息:
2017-03-21 21:54:30,003 INFO method:com.hopechart.bapi.job.DeFaultJob.execute(DeFaultJob.java:33) - [开始更新缓存]计划任务开始执行... 2017-03-21 21:54:32,592 ERROR method:org.quartz.core.JobRunShell.run(JobRunShell.java:216) - Job DEFAULT.defaultJobDetail threw an unhandled Exception:
org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'execute' on target class [class com.hopechart.bapi.job.DeFaultJob] failed; nested exception is java.lang.NullPointerException
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:266)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:75)
at org.quartz.core.JobRunShell.run(JobRunShell.java:207)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560)
Caused by: java.lang.NullPointerException
2017-03-21 21:54:32,592 ERROR method:org.quartz.core.ErrorLogger.schedulerError(QuartzScheduler.java:2460) - Job (DEFAULT.defaultJobDetail threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'execute' on target class [class com.hopechart.bapi.job.DeFaultJob] failed; nested exception is java.lang.NullPointerException]
at org.quartz.core.JobRunShell.run(JobRunShell.java:218)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560)
Caused by: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'execute' on target class [class com.hopechart.bapi.job.DeFaultJob] failed; nested exception is java.lang.NullPointerException
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:266)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:75)
at org.quartz.core.JobRunShell.run(JobRunShell.java:207)
... 1 more
Caused by: java.lang.NullPointerException
2017-03-21 21:55:00,001 INFO method:com.hopechart.bapi.job.DeFaultJob.execute(DeFaultJob.java:33) - [开始更新缓存]计划任务开始执行...
2017-03-21 21:55:01,499 ERROR method:org.quartz.core.JobRunShell.run(JobRunShell.java:216) - Job DEFAULT.defaultJobDetail threw an unhandled Exception:
org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'execute' on target class [class com.hopechart.bapi.job.DeFaultJob] failed; nested exception is java.lang.NullPointerException
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:266)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:75)
at org.quartz.core.JobRunShell.run(JobRunShell.java:207)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560)
Caused by: java.lang.NullPointerException
2017-03-21 21:55:01,499 ERROR method:org.quartz.core.ErrorLogger.schedulerError(QuartzScheduler.java:2460) - Job (DEFAULT.defaultJobDetail threw an exception.
异常信息附件:
487ab3c9d2e0448aa0dfdbfdb141c615-Exception.txt
这个就是抛出的异常信息。没遇到过这样的情况,大家有遇到过么?怎么解决的呢?在线等~
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于