启动springboot,报错:quartz集群报错:

Sep 09, 2016 5:33:47 AM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Sep 09, 2016 5:33:57 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Sep 09, 2016 5:34:26 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.zynsun.platform.quartz.QuartzJobManager com.zynsun.platform.controller.quartz.SchedulerController.quartzJobManager; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzJobManager': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.scheduling.quartz.SchedulerFactoryBean com.zynsun.platform.quartz.QuartzJobManager.schedulerFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerFactory' defined in file [/usr/local/tomcat/apache-tomcat-7.0.64_2/webapps/ashare/WEB-INF/classes/config/spring-quartz.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Cannot run without an instance id.
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1208)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:434)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5003)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1930)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.zynsun.platform.quartz.QuartzJobManager com.zynsun.platform.controller.quartz.SchedulerController.quartzJobManager; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzJobManager': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.scheduling.quartz.SchedulerFactoryBean com.zynsun.platform.quartz.QuartzJobManager.schedulerFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerFactory' defined in file [/usr/local/tomcat/apache-tomcat-7.0.64_2/webapps/ashare/WEB-INF/classes/config/spring-quartz.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Cannot run without an instance id.
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
... 26 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzJobManager': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.scheduling.quartz.SchedulerFactoryBean com.zynsun.platform.quartz.QuartzJobManager.schedulerFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerFactory' defined in file [/usr/local/tomcat/apache-tomcat-7.0.64_2/webapps/ashare/WEB-INF/classes/config/spring-quartz.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Cannot run without an instance id.
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1208)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1120)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1044)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)
... 28 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.scheduling.quartz.SchedulerFactoryBean com.zynsun.platform.quartz.QuartzJobManager.schedulerFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerFactory' defined in file [/usr/local/tomcat/apache-tomcat-7.0.64_2/webapps/ashare/WEB-INF/classes/config/spring-quartz.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Cannot run without an instance id.
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
... 39 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerFactory' defined in file [/usr/local/tomcat/apache-tomcat-7.0.64_2/webapps/ashare/WEB-INF/classes/config/spring-quartz.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Cannot run without an instance id.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1572)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1120)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1044)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)
... 41 more
Caused by: java.lang.IllegalStateException: Cannot run without an instance id.
at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:1215)
at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1519)
at org.springframework.scheduling.quartz.SchedulerFactoryBean.createScheduler(SchedulerFactoryBean.java:597)
at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:480)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1631)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568)
... 51 more Sep 09, 2016 5:34:26 AM org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'webapp.root' = [/usr/local/tomcat/apache-tomcat-7.0.64_2/webapps/ashare/]
Sep 09, 2016 5:34:26 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Logback from [classpath:logback.xml]
Sep 09, 2016 5:34:36 AM org.apache.catalina.core.ApplicationContext log
INFO: JUL to SLF4J bridge is not available on the classpath
Sep 09, 2016 5:34:36 AM org.apache.catalina.core.ApplicationContext log
INFO: Shutting down Logback
Sep 09, 2016 5:34:36 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext

解决:

vim 编辑/etc/hosts文件,将当前服务器主机名添加到127.0.0.1 后面任意位置 如图所示:

java.lang.IllegalStateException: Cannot run without an instance id.的更多相关文章

  1. java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [META-INF/services/com.alibaba.druid.filter.Filter].

    九月 11, 2019 2:56:36 下午 org.apache.catalina.loader.WebappClassLoaderBase checkStateForResourceLoading ...

  2. "java.lang.IllegalStateException: No instrumentation registered! Must run under a registering instrumentation."问题解决

    问题描述 运行uiautomator,报错"java.lang.IllegalStateException: No instrumentation registered! Must run ...

  3. junit测试时,出现java.lang.IllegalStateException: Failed to load ApplicationContext

    课程设计要求进行junit测试,我是在已经做好的ssh项目上做的测试,测试类代码如下 package com.zhang.web.services; import static org.junit.A ...

  4. 处理eclipse启动时报java.lang.IllegalStateException

    这是我写的第一篇博客,博客我来了: 我是好学的人,希望在这上面遇到志同道合的人,对技术有更高追求的人: 重启eclipse的时候报出来 An error has occurred, See the l ...

  5. 解决java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext这个问题

    今天在运行别人的SSH项目时,遇到了这个问题 严重: Exception sending context initialized event to listener instance of class ...

  6. java.lang.IllegalStateException: Failed to load ApplicationContext

    1.错误描述 七月 13, 2014 6:34:41 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBean ...

  7. 集成JUnit测试错误java.lang.IllegalStateException: Failed to load ApplicationContext

    1 详细错误信息 java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.t ...

  8. java.lang.IllegalStateException——好头疼

    在我东,下下来一个项目总会出现启动不了的问题,这些问题往往在编译的时候发现不了,当你的服务器启动的时候,就是一片片的报错,有些问题可以通过异常的提示信息,判断出来哪里配置错了,但是也有些情况下,从异常 ...

  9. java.lang.IllegalStateException: Failed to load ApplicationContext selenium 异常 解决

    WARN <init>, HHH000409: Using org.hibernate.id.UUIDHexGenerator which does not generate IETF R ...

随机推荐

  1. Nginx访问权限配置

    最近建个人网站,在服务器上新建了一个用户zengfp,并且把网站的目录放到了/home/zengfp/www目录下,配置的nginx: server { listen 80 default_serve ...

  2. .net3.5 支持tuple

    添加下面引用即可: https://github.com/SaladLab/NetLegacySupport

  3. LR逻辑回归文章

    http://blog.csdn.net/suipingsp/article/details/41822313

  4. 洛谷P1809 过河问题_NOI导刊2011提高(01)

    To 洛谷.1809 过河问题 题目描述 有一个大晴天,Oliver与同学们一共N人出游,他们走到一条河的东岸边,想要过河到西岸.而东岸边有一条小船. 船太小了,一次只能乘坐两人.每个人都有一个渡河时 ...

  5. prufer编码

    看51nod的一场比赛,发现不会大家都A的一道题,有关prufer的 我去年4月就埋下prufer这个坑,一直没解决 prufer编码是什么 对于一棵无根树的生成的序列,prufer序列可以和无根树一 ...

  6. Vue发送请求

    可以试试玩ajax请求,个人觉得axios用Promise包装了下,代码美观 axios请求使用方法      https://github.com/axios/axios#using-applica ...

  7. No mapping found for HTTP request with URI [/webapp/] in DispatcherServlet with name 'SpringMVC'

    可能有如下几个原因: 1.是否设置了web目录,在IDEA中,web目录是这样的 如果没有设置,按照下面的方法设置: 选中要设置的模块,点击file.project structure,设置web.x ...

  8. python2和python3比较好的共存方法

    文章根据网络资料编写,只为个人学习使用.青山... ---------------------------------------------------- 由于工作学习的需求,大家都想同时安装pyt ...

  9. BZOJ1439 : YY的问题

    考虑容斥,枚举哪些不存在的边选中了,剩下的不管,则可以用组合数计算方案数. 时间复杂度$O(m2^m+nm)$. #include<cstdio> const int N=550,B=10 ...

  10. [jzoj]1229.Hanoi

    Link https://jzoj.net/senior/#main/show/1229 Description Mpq 小时候只玩过俄罗斯方块这个经典的小游戏,当时他还不知道Hanoi 究竟是什么东 ...