tomcat启动报错:Injectjion of autowired dependencies failed





环境:

操作系统:centos6.5

tomcat: 7.0.52

jdk:openjdk 1.8.101





报错背景:

将原有的tomcat环境移植到新的服务器后,tomcat无法正常启动,报错如下:





严重: StandardWrapper.Throwable

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.yunva.common.eventbus.EventBusPostProcessor#0': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException:
Could not autowire field: private com.google.common.eventbus.EventBus com.xxx.common.eventbus.EventBusPostProcessor.eventBus; nested exception is java.lang.IllegalArgumentException

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:288)





搜索了下,大概意思说java的spring无法自动搜索并管理bean服务,需要加入@注解





修改源码太麻烦,用运维的思路来解决:

1.首先排除tomcat的问题,单独起tomcat没有问题

2.问题可能出在java版本上,原有的服务器使用的是jdk7.0.25,现有的Java使用的是openjdk1.8.101

①可能是openjdk和jdk不兼容

将tomcat放在windows上(本地windows刚好有java8环境),启动依旧报错,更换tomcat8问题依旧

②可能是jdk版本不兼容,为加快速度在windows中搭建jdk7.0.25,启动ok,于是更新版本的jdk7.0.52也ok,于是判断问题出在jdk版本上





在centos中卸载openjdk1.8安装jdk1.7.80问题解决

tomcat启动报错:Injection of autowired dependencies failed的更多相关文章

  1. tomcat启动报错:Injection of autowired dependencies failed

    Error creating bean with name 'backPrintPaperController': Injection of autowired dependencies failed ...

  2. 使用Mybatis整合spring时报错Injection of autowired dependencies failed;

    这是无法自动注入,通过查找,我出错的原因在于配置文件的路径没有写对,在applicationContext.xml中是这样写的. <bean id="sqlSessionFactory ...

  3. tomcat 启动报错org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].xxx

    今天在写完一个非常简单的servlet页面跳转的web项目后,启动tomcat报错org.apache.catalina.LifecycleException: Failed to start com ...

  4. Tomcat启动报错:org.apache.catalina.LifecycleException: Failed to start component...java.util.zip.ZipException: error in opening zip file

    1.项目环境 IntelliJ IDEA2018.1.6 apache-tomcat-8.0.53 基于springboot开发的项目 maven3.5.3 2.出现问题 从svn同步下项目 启动to ...

  5. tomcat 启动报错org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalin

    IDEA tomcat 7.0.53 严重: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed ...

  6. Tomcat启动报错:org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalin

    Error starting ApplicationContext. To display the auto-configuration report re-run your application ...

  7. tomcat启动报错:A child container failed during start

    环境:maven3.3.9+jdk1.8+tomcat8.5 错误详细描述: 严重: A child container failed during start java.util.concurren ...

  8. eclipse 启动tomcat报Spring错误 Error creating bean with name 'serviceOrderBiz': Injection of autowired dependencies failed

    启动tomcat报异常,提示Sring无法创建serviceOrderBiz(第一行红字),继续看是因为有一个自动注入的字段无法注入ModuleInterfaceBiz(第二行红字),检查servic ...

  9. IDEA报错: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.url' in value "${spring.datasource.url}"

    运行审核流模块: 在ActivitiServiceApplication模块日志报错: Error starting ApplicationContext. To display the auto-c ...

随机推荐

  1. DEP

    DEP(Data execution protect)数据执行保护,这个功能需要操作系统和硬件的共同支持才可以生效.DEP的原理就是在系统的内存页中设置了一个标志位,标示这个内存页的属性(可执行). ...

  2. [Cyan之旅]使用NPOI实现Excel的导入导出,踩坑若干.

    Cyan是博主[Soar360]自2014年以来开始编写整理的工具组件,用于解决现实工作中常用且与业务逻辑无关的问题. 什么是NPOI? NPOI 是 POI 项目的 .NET 版本.POI是一个开源 ...

  3. 冒泡排序的C、C++实现

    一.冒泡排序 冒泡排序就是重复地走访过要排序的元素列,依次比较两个相邻的元素,如果他们的顺序(如数字从大到小.首字母从A到Z)错误就把他们交换过来.走访元素的工作是重复地进行直到没有相邻元素需要交换, ...

  4. Windows 7 上面安装 dotnet core 之后 使用 应用报错的处理:api-ms-win-crt-runtime-l1-1-0.dll 丢失

    Windows2016 使用 dotnet core的使用 安装了就可以了 但是发现 windows 7 不太行 报错如图示 没办法简单百度了下 https://www.microsoft.com/z ...

  5. [转帖]linux namespace 和cgroup lxc

    https://blog.csdn.net/xiaoliuliu2050/article/details/53443863 5.1 linux namespace 和cgroup lxc 2016年1 ...

  6. 5 vue-cli整合axios的几种方法

    vue-cli配置axios https://www.cnblogs.com/rinzoo/p/7880525.html https://www.cnblogs.com/XHappyness/p/76 ...

  7. Lisp之根源 --- 保罗格雷厄姆

    Lisp之根源 --- 保罗格雷厄姆 来源 http://daiyuwen.freeshell.org/gb/rol/roots_of_lisp.html 约翰麦卡锡于1960年发表了一篇非凡的论文, ...

  8. 【Revit API】FamilyInstance、FamilySymbol、Family的寻找关系

    话不多说,做个笔记 FamilyInstance instance; var typeid = instance.GetTypeId(); var symbol = RevitDoc.GetEleme ...

  9. 洛谷P4135 作诗

    题意:[l,r]之间有多少个数出现了正偶数次.强制在线. 解:第一眼想到莫队,然后发现强制在线...分块吧. 有个很朴素的想法就是蒲公英那题的套路,做每块前缀和的桶. 然后发现这题空间128M,数组大 ...

  10. python之旅:网络编程

    一 客户端/服务器架构 1.硬件C/S架构(打印机) 2.软件C/S架构 互联网中处处是C/S架构 如黄色网站是服务端,你的浏览器是客户端(B/S架构也是C/S架构的一种) 腾讯作为服务端为你提供视频 ...