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. Alpha 冲刺七

    团队成员 051601135 岳冠宇 051604103 陈思孝 031602629 刘意晗 031602248 郑智文 031602234 王淇 会议照片 项目燃尽图 项目进展 无进展!!!! 项目 ...

  2. 如何访问cxGrid控件过滤后的数据集

    var I: Integer; begin Memo1.Lines.Clear; with cxGrid1DBTableView1.DataController do for I := 0 to Fi ...

  3. Linux命令(十九) 查看系统负载 uptime

    一.命令介绍 Linux 系统中 uptime 命令主要用于获取主机运行时长和查询Linux系统负载等信息. uptime 命令可以显示系统已经运行了多长时间,信息显示依次为:现在时间.系统已经运行时 ...

  4. 深入 Java Web

    该系列 记录下,深入 学习 Java Web 过程. 1.Tomcat总体结构 2.Tomcat 启动流程 3.ServletContext详解 4.Servlet详解

  5. java工程师需要学什么

    成为一名Java高级工程师你需要学什么 宏观上: 1.技术广度方面至少要精通多门开源技术吧,研究过struts\spring等的源码. 2.项目经验方面从头到尾跟过几个大项目,头是指需求阶段,包括需求 ...

  6. linux服务器mysql数据库新建数据库并配置数据库用户

    第一步:进入数据库 mysql -uroot -p 提示输入密码,输入你的root用户密码(默认不显示) 如下图: 第二步:创建一个数据库 create database 数据库名称 ;(注意分号结尾 ...

  7. C++11 自动推导auto

    C++11 自动推导auto C++11中引入的auto主要有两种用途:自动类型推导和返回值占位. auto在C++98中的标识临时变量的语义,由于使用极少且多余,在C++11中已被删除.前后两个标准 ...

  8. 【题解】 bzoj1911: [Apio2010]特别行动队 (动态规划+斜率优化)

    bzoj1911,懒得复制,戳我戳我 Solution: 线性DP(打牌) \(dp\)方程还是很好想的:\(dp[i]=dp[j-1]+a*(s[i]-s[j-1])^2+b*(s[i]-s[j-1 ...

  9. svn cleanup

    SVN 本地更新时,由于一些操作中断更新,如磁盘空间不够,用户取消. 可能会造成本地文件被锁定的情况.一般出现这种情况的解决方法: 1.可以使用SVN clean up来清除锁定. 2.如果不是本目录 ...

  10. webpack插件去除没用到的css

    去除没用到的css需要用到purifycss-webpack插件,而这个插件又依赖于purify-css 1.安装 npm i purifycss-webpack purify-css -D 2.加入 ...