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. Razor - 标记简述

    详情请参考:http://www.runoob.com/aspnet/razor-intro.html 1.Razor 不是一种编程语言.它是服务器端的标记语言.基于服务器的代码(Visual Bas ...

  2. Angular中ui-grid的使用详解

    Angular中ui-grid的使用 在项目开发的过程中,产品经理往往会提出各种需求,以提高用户体验.最近,项目中用到的表格特别多,而且表格的列数和行数也超多.为了让用户浏览更爽,产品经理提出,当表格 ...

  3. cglib动态代理是通过继承父类的方式进行代理的 不是通过接口方式进行动态代理的 因此可以对普通的类进行代理

    cglib动态代理是通过继承父类的方式进行代理的 不是通过接口方式进行动态代理的

  4. 【BZOJ3733】[Pa2013]Iloczyn (搜索)

    [BZOJ3733][Pa2013]Iloczyn (搜索) 题面 BZOJ 题解 把约数筛出来之后,直接爆搜,再随便剪枝就过了. 最近一句话题解倾向比较严重 #include<iostream ...

  5. 界面编程之QT的Socket通信20180730

    /*******************************************************************************************/ 一.linu ...

  6. RBAC: 基于角色的访问控制(Role-Based Access Control)

    本文只讨论两种基于角色的访问控制的不同点,不涉及权限设计的数据库设计. 基于角色的访问控制(Role-Based Access Control)可分为隐式角色访问控制和显式角色访问控制. 隐式角色访问 ...

  7. 将句子表示为向量(上):无监督句子表示学习(sentence embedding)

    1. 引言 word embedding技术如word2vec,glove等已经广泛应用于NLP,极大地推动了NLP的发展.既然词可以embedding,句子也应该可以(其实,万物皆可embeddin ...

  8. MySQL命令行查询乱码解决办法

    MySQL会出现中文乱码的原因不外乎下列几点: 1.server本身设定问题,例如还停留在latin1 2.table的语系设定问题(包含character与collation) 3.客户端程式(例如 ...

  9. OOP的函数方法

    <?php class Computer{ //我要创建一个构造方法 public function __construct(){ echo '我是比较先进的构造方法!'; //构造方法一般用于 ...

  10. 「Django」浏览+1的操作

    适应于网页.文章等浏览次数统计 1.Models设置:添加viewed方法 class NewsTitle(models.Model): title = models.CharField(max_le ...