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包。
相关文章推荐
- java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.<init>(Unknown Source)
- at org.springframework.asm.ClassReader.<init>(Unknown Source)
- bug-解决-springMVC框架 启动tomcat时 (at org.springframework.asm.ClassReader.<init>(Unknown Source))问题
- at org.springframework.asm.ClassReader.<init>(Unknown Source)
- spring web项目启动报错,java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.<init>
- springframework.asm.ClassReader.<init>(Unknown Source)
- IllegalArgumentException at org.springframework.asm.ClassReader when initializing Spring context
- StrutsSpringHibernate - java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V
- NoSuchMethodError: org.springframework.core.convert.Property.<init>(Ljava/lang/Class;Ljava/lang/refl
- spring整合jbpm Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V
- (问题解决)Spring @Async无法注入Controller java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(
- StrutsSpringHibernate - java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V
- spring+redis 报错 org.springframework.core.serializer.support.DeserializingConverter.<init>(Ljava/lang/ClassLoader;)V
- java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class;)V
- StrutsSpringHibernate - java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V
- 那些年踩过的坑之(3)IllegalArgumentException at org.springframework.asm.ClassReader when initializing Spring
- java.lang.NoSuchMethodError: org.springframework.beans.factory.support.RootBeanDefinition.<init>
- at javax.swing.ImageIcon.<init>(Unknown Source)
- java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V
- Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V