Could not start Quartz Scheduler after delay; nested exception is org.quartz.SchedulerException:

目录

    • 问题描述
    • 解决过程
    • 总结

问题描述

首先这个项目是存在定时器的,然后看似是定时任务报错导致的项目启动不起来,其实不然。

2020-11-19 15:22:06.141 [restartedMain] INFO  com.alibaba.druid.pool.DruidDataSource 1609 - {dataSource-1} closed
2020-11-19 15:22:06.952  INFO 1352 --- [lerFactoryBean]] o.s.s.quartz.SchedulerFactoryBean        : Starting Quartz Scheduler now, after delay of 1 seconds
2020-11-19 15:22:06.952 [Quartz Scheduler [schedulerFactoryBean]] INFO  org.springframework.scheduling.quartz.SchedulerFactoryBean 665 - Starting Quartz Scheduler now, after delay of 1 seconds
Exception in thread "Quartz Scheduler [schedulerFactoryBean]" org.springframework.scheduling.SchedulingException: Could not start Quartz Scheduler after delay; nested exception is org.quartz.SchedulerException: The Scheduler cannot be restarted after shutdown() has been called.
	at org.springframework.scheduling.quartz.SchedulerFactoryBean$1.run(SchedulerFactoryBean.java:671)
Caused by: org.quartz.SchedulerException: The Scheduler cannot be restarted after shutdown() has been called.
	at org.quartz.core.QuartzScheduler.start(QuartzScheduler.java:557)
	at org.quartz.impl.StdScheduler.start(StdScheduler.java:142)
	at org.springframework.scheduling.quartz.SchedulerFactoryBean$1.run(SchedulerFactoryBean.java:668)

解决过程

在刚开始的时候一直是以为定时任务导致的项目启动不起来,却忽略了上面报错日志。搜了很多关于定时器报错的问题,都没有解决。然后往上一翻原来是有别的报错。就是Mybatis的映射文件resultMap填错了。改完之后就好了。

Could not start Quartz Scheduler after delay; nested exception is org.quartz.SchedulerException:_第1张图片

总结

在遇到报错的时候,一定要沉着冷静,好好观察日志。再观察完日志之后,才能快速的锁定报错原因。

你可能感兴趣的:(常见报错,java)