nested exception is java.lang.IllegalStateException: Context namespace element 'annotation-config' a
公司还用的是spring低版本,今天用jre 8测试了一下,发现错误:
Unexpected exception parsing XML document from class path resource [applicationContext-dao.xml]; nested exception is java.lang.IllegalStateException: Context namespace element 'annotation-config' and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser] are only available on JDK 1.5 and higher,看源码是org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser自动检测,jdk版本检测时需要jre1.5以上版本,但是JdkVersion只检查到了1.7,jre1.8 时不匹配任何jdk。
网上招到了解决的方法,https://my.oschina.net/u/553266/blog/825103
网上的解决方法无非两种:降低jdk的版本或者修改spring-2.5.6.jar的源码.这些都不是我想要的。我查看了一下在spring-2.5.6jar的org\springframework\core\下有JdkVersion.class这个类,同时在spring-core.4.2.0.RELEASE也有这个类,所以在引入jar包的时候不需要引入spring-2.5.6jar只引入spring-core.4.2.0.RELEASE就行了。问题解决。
转载于:https://www.cnblogs.com/java-synchronized/p/8394952.html
nested exception is java.lang.IllegalStateException: Context namespace element 'annotation-config' a相关推荐
- java.lang.IllegalStateException: Context namespace element ‘annotation-config’ and its parser class
项目中用的是spring低版本(2.5.6),今天用jre 8测试了一下,发现错误: Unexpected exception parsing XML document from class path ...
- Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous map
Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous map ...
- nested exception is java.lang.IllegalStateException: refreshAfterWrite requires a LoadingCache异常解决
nested exception is java.lang.IllegalStateException: refreshAfterWrite requires a LoadingCache异常解决 问 ...
- spring boot 启动 nested exception is java.lang.IllegalStateException
2019独角兽企业重金招聘Python工程师标准>>> 在启动spring boot 项目时报错,之前都是OK的,只是我引用了内置的tomcat包就报错了 <dependenc ...
- methodinvocationexception: property ‘driverclassname‘ threw exception; nested exception is java.lang
抛出异常: "D:\Program Files\Java\jdk1.8.0_131\bin\java.exe" "-javaagent:D:\Program Files ...
- 报错记录:SprintBoot---Unable to start embedded container; nested exception is java.lang……
报错信息 练习一个SpringBoot的小例子后,报出以下错误:Unable to start embedded container; nested exception is java.lang.No ...
- Factory method ‘redisConnectionFactory‘ threw exception; nested exception is java.lang.NoClassDefFou
Factory method 'redisConnectionFactory' threw exception; nested exception is java.lang.NoClassDefFou ...
- Factory method ‘sqlSessionFactory‘ threw exception; nested exception is java.lang.NoSuchMethodError:
springboot 引入mybatis-plus后报错: Factory method 'sqlSessionFactory' threw exception; nested exception i ...
- 【日常Exception】第二十四回:nested exception is java.lang.NoClassDefFoundError: redis/clients/jedis/util/Pool
热门系列: 程序人生,精彩抢先看 日常异常,是否也有你似曾相识的那一个 1.问题 近期遇到的一个异常问题如题所示,下面是完整的异常内容,原景重现: PropertyAccessException 1: ...
最新文章
- 程序员学历低,该被歧视吗? | 每日趣闻
- 2021泰晤士世界大学排名公布,中国137所高校上榜!
- 怎样用C语言数码管编写E1显示程序,跪求单片机0~99数码管显示用C语言编写的程序...
- C/C++之vector的内存管理和效率
- 前端学习(2975):路由传参的两种方式
- 电脑显示服务器负载信息失败,线上服务mcelog负载异常分析处理流程
- python写的软件怎么逆向_python逆向工程:通过代码生成类图
- STL里面的sort()函数使用结构体
- CentOS 手工编译、手动编译安装 MongoDB
- win7卸载显卡及对应驱动后桌面分辨率不对以及鼠标键盘无反应
- CSP202009-2 风险人群筛查(100分)【序列处理】
- AB=0与伴随矩阵相互作用型题
- 经验分享:vim编辑器的常用命令使用汇总
- swift moya框架+rxswift+handyjson+SwiftyJSON封装和使用教程
- 澳大利亚:令人钦羡的高福利国家 - 老牛的日志 - 网易博客
- 输电线路覆冰智能预测预警系统
- MyEclipse 使用教程
- 安装spark的详细步骤
- android厨房的使用方法,懒人生活的福音:Android在厨房_软件资讯技巧应用-中关村在线...
- mocha.opts配置文件