您的位置:首页 > 编程语言 > Java开发

at org.springframework.asm.ClassReader.<init>(Unknown Source)

2017-12-15 17:44 537 查看
Exception in thread "main" 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.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:70)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:253)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>


原因:

The exception you see is not very likely to be cause by invalid Spring configuration but your classpath setup. This feels like a version incompatibility regarding the ASM libraries and Java 8. The ASM version, Spring 3.2 depends on is known to be incompatible with Java 8.

Thus, if you want run your code with Java 8, you need to use a recent Spring 4.0 version


解决方法:jdk7和jdk8版本导致项目中依赖起了冲突,可以降低jdk的版本或则使用spring4的jar包。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  jdk版本冲突
相关文章推荐