有关eclipse for java ee版本遇到的坑( Context initialization failed)
2016-02-14 22:05
369 查看
这几天把以前网上看的视频的源代码拷贝到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以及以下的版本来编译运行项目
严重: 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以及以下的版本来编译运行项目
相关文章推荐
- eclipse中离线安装genymotion插件
- Spring+Quartz(定时任务)
- JVM如何判断对象是否需要被回收
- 一个简单的springmvc-mybatis项目,新闻网站
- eclipse卸载自带maven
- eclipse卸载自带maven
- 【JAVA】9、表达式类型的转换
- java定时删除文件夹及文件
- 从头认识Spring-2.3 注解装配-@autowired(4)-required(2)
- spring的ioc简述
- 【JAVA】8、简洁表达式
- 初窥JAVA底层————System.out.println("Hello World");
- Spring核心组件
- Spring MVC 系列(一)——Spring MVC核心组件及工作流程解析
- 从头认识Spring-2.3 注解装配-@autowired(4)-required(1)
- SpringMVC综合使用手机管理系统Controller层开发
- Java匿名内部类浅析
- SpringMVC介绍之Validation
- SpringMvc中Interceptor拦截器用法
- spring表达式语言spel