org.springframework.web.context.ContextLoader -0 [localhost-startStop-1] ERROR org.springframewor

2017-10-17 11:39:01 163 - org.springframework.web.context.ContextLoader -0  

 [localhost-startStop-1] ERROR org.springframework.web.context.ContextLoader  - Context initialization failed

java.lang.IllegalArgumentException
at org.springframework.asm.ClassReader.(Unknown Source)
at org.springframework.asm.ClassReader.(Unknown Source)
at org.springframework.asm.ClassReader.(Unknown Source)
at org.springframework.core.type.classreading.SimpleMetadataReader.(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)

at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass

(ConfigurationClassParser.java:230)

at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass

(ConfigurationClassParser.java:153)

at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:130)

at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions

(ConfigurationClassPostProcessor.java:285)

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.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:748)


这个看起来根本不知道错误原因的错误很可能是因为JDK的版本与spring的包冲突了,

像我就是本来工作空间的JDK默认版本是1.7,后来玩springboot改成1.8,之前spring的包大

部分都是3.2.0版本的项目启动就报这个错了,然后再把JDK改回为1.7就好了。

你可能感兴趣的:(org.springframework.web.context.ContextLoader -0 [localhost-startStop-1] ERROR org.springframewor)