有关eclipse for java ee版本遇到的坑( Context initialization failed)

这几天把以前网上看的视频的源代码拷贝到eclipse下面进行学习,当时用的是eclipse-jee-neon-M4a-win32-x86_64这个版本的eclipse,因为它本身集合了web开发插件,谁知道弄好后,发现他需要运行在java8的版本下面,后来就下载安装java8,谁知道一切准备就绪后,发现我的项目无法运行,一直再报

严重: Context initialization failed
java.lang.IllegalArgumentException
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:52)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76)
at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:298)
at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)

。。。。

这个错,我一直在网上找后来找到了答案

http://stackoverflow.com/questions/24128045/spring-context-initialization-failed-with-java-lang-illegalargumentexception-whi

后来我才知道,这个项目因为应用了spring 框架,但是这个框架如果想在java8下面开发使用,就必须使用spring 4.0以上的版本,否则就会报错。

所以解决方案两种,要么让自己项目中的所有spring的jar包换成4.0以上的,要么就是更换eclipse版本,同时使用java7以及以下的版本来编译运行项目

转载于:https://www.cnblogs.com/wangpengtao/p/5189651.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值