Quartz任务调用时报错Based on configured schedule, the given trigger ‘DEFAULT.xxx’ will never fire.

  • Post author:
  • Post category:其他


quartz.SchedulerFactoryBean#0_$_NON_CLUSTERED paused.

[framework] 2018-07-16 19:36:55,491 – org.quartz.core.QuartzScheduler -7205 [main] INFO  org.quartz.core.QuartzScheduler  – Scheduler org.springframework.scheduling.quartz.SchedulerFactoryBean#0_$_NON_CLUSTERED shutdown complete.

[framework] 2018-07-16 19:36:55,498 – org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean -7212 [main] INFO  org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean  – Closing Hibernate SessionFactory

[framework] 2018-07-16 19:36:55,498 – org.hibernate.impl.SessionFactoryImpl -7212 [main] INFO  org.hibernate.impl.SessionFactoryImpl  – closing

[framework] 2018-07-16 19:36:55,513 – org.springframework.web.servlet.DispatcherServlet -7227 [main] ERROR org.springframework.web.servlet.DispatcherServlet  – Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘schedulerFactoryBean’ defined in class path resource [spring-quartz.xml]: Invocation of init method failed; nested exception is org.quartz.SchedulerException: Based on configured schedule, the given trigger ‘DEFAULT.cronTriggerToExecute’ will never fire.

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1482)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:610)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)

at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651)

at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599)

at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665)

at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518)

at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:459)

at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)

at javax.servlet.GenericServlet.init(GenericServlet.java:212)

at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1213)

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)

at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4425)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4738)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

at org.apache.catalina.core.StandardService.start(StandardService.java:525)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)

at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:243)

Caused by: org.quartz.SchedulerException: Based on configured schedule, the given trigger ‘DEFAULT.cronTriggerToExecute’ will never fire.

at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:928)

at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:258)

at org.springframework.scheduling.quartz.SchedulerAccessor.addTriggerToScheduler(SchedulerAccessor.java:371)

at org.springframework.scheduling.quartz.SchedulerAccessor.registerJobsAndTriggers(SchedulerAccessor.java:303)

at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:511)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1541)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479)

… 37 more

七月 16, 2018 7:36:55 下午 org.apache.coyote.http11.Http11NioProtocol start

信息: Starting Coyote HTTP/1.1 on http-172.16.1.85-8081

七月 16, 2018 7:36:55 下午 org.apache.catalina.startup.Catalina start

信息: Server startup in 9847 ms

错误原因:

Based on configured schedule, the given trigger ‘DEFAULT.mailTrigger’ will never fire.

被quartz调度的某个任务通过cron表达式配置了不合法或过去的时间;该job永远不会被执行到!

解决方案:

重新设置合法的触发时间!



版权声明:本文为u011510160原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。