Spring3.X jdk8 java.lang.IllegalArgumentException

 

异常提示:

 1 javax.servlet.ServletException: Servlet.init() for servlet springMVC threw exception
 2     org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
 3     org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
 4     org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
 5     org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
 6     org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
 7     org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
 8     org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2466)
 9     org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2455)
10     java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
11     java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
12     org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
13     java.lang.Thread.run(Thread.java:745)
14 
15 root cause
16 
17 java.lang.IllegalArgumentException
18     org.springframework.asm.ClassReader.<init>(Unknown Source)
19     org.springframework.asm.ClassReader.<init>(Unknown Source)
20     org.springframework.asm.ClassReader.<init>(Unknown Source)
21     org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:52)
22     org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
23     org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102)
24     org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76)
25     org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:298)
26     org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
27     org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
28     org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:230)
29     org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:153)
30     org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:130)
31     org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:285)
32     org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)
33     org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
34     org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
35     org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:652)
36     org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:600)
37     org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:666)
38     org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:519)
39     org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:460)
40     org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
41     javax.servlet.GenericServlet.init(GenericServlet.java:158)
42     org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
43     org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
44     org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
45     org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
46     org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
47     org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
48     org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2466)
49     org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2455)
50     java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
51     java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
52     org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
53     java.lang.Thread.run(Thread.java:745)

解决办法:

一:把jdk版本换成1.7 or 1.7以下

二:使用spring 4.0RELEASE及以上版本

 

原文链接:http://www.cnblogs.com/suibianle/p/4730450.html 

posted @ 2015-08-14 16:41  建波  阅读(11842)  评论(7编辑  收藏  举报