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. 团队伊始——DreamCatcher

    我们的团队,队名是DreamCatcher,中文意思是追梦人,它是一首歌曲,所属专辑是<新世纪的曙光>. 这是一首很好听的歌曲,里面有一句歌词是: I'm a dream catcher ...

  2. PAT 1048 数字加密

    https://pintia.cn/problem-sets/994805260223102976/problems/994805276438282240 本题要求实现一种数字加密方法.首先固定一个加 ...

  3. JavaScript ES6中export及export default的区别以及import的用法

    本文原创地址链接:http://blog.csdn.net/zhou_xiao_cheng/article/details/52759632,未经博主允许不得转载. 相信很多人都使用过export.e ...

  4. 使用alpine的docker镜像下 dind 的方式安装dotnet core 的一个非dockerfile的方法

    1. 下载dind的镜像 docker pull docker:dind 2. 执行该镜像 docker run -it --privileged --name some-docker -d dock ...

  5. Day12-navicat for sqlite 11.1.12 patch 永久使用版

    参考来源:http://www.cnblogs.com/yueyue184/p/6407963.html 深深感谢!!! 因为最近需要用这个但是网上都是注册机没有成功注册,所以就自己动手使用ollyd ...

  6. [COGS 2551] 新型武器

    图片加载可能有点慢,请跳过题面先看题解,谢谢 这个题好多解法啊... 可以主席树,可以按深度将操作排序离线做 我这里是动态开点线段树,对每一个深度种一棵线段树,下标是节点的\(dfs\)序 然后这个做 ...

  7. 德国GG了

    我想起了今年ZJOI 这就是生活啊,伤悲总是要面对的

  8. CentOS安装git及使用Gitolite来管理版本库

    首先吐槽一下网上的各种教程,大部分都扯蛋,估计都是些所谓的"编辑"在网上瞎抄来的-- 以下内容都是基于CentOS的服务器端,Mac OS X的客户端. 如果是使用的Windows ...

  9. 7:servlet request getHeader("x-forwarded-for") 获取真实IP

    在JSP里,获取客户端的IP地址的方法是:request.getRemoteAddr(),这种方法在大部分情况下都是有效的.但是在通过了 Apache,Nagix等反向代理软件就不能获取到客户端的真实 ...

  10. AngularJS总结

    因为最近想学习一下ionic框架,了解到ionic是基于AngularJS语法,并且通过SASS构建应用程序,之前自己一直用Vue框架,还有Less,刚刚好趁此机会,学习一下AngularJS与SAS ...