SpringMVC-FAQ(2):java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapa

版权声明: https://blog.csdn.net/qq_29166327/article/details/78717800

·(1)看Log:

java.lang.NoClassDefFoundError: org/springframework/core/env/ConfigurableEnvironment
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2483)
at java.lang.Class.getConstructor0(Class.java:2793)
at java.lang.Class.getDeclaredConstructor(Class.java:2043)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:105)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:348)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:281)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at runjettyrun.Bootstrap.main(Bootstrap.java:275)
Caused by: java.lang.ClassNotFoundException: org.springframework.core.env.ConfigurableEnvironment
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:392)
at runjettyrun.ProjectClassLoader.loadClass(ProjectClassLoader.java:320)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363)
... 18 more
2015-06-04 09:58:25.073:WARN::failed runjettyrun.HSFJettyWebAppContext@6623a0d3{/,src/main/webapp}: java.lang.NoClassDefFoundError: org/springframework/core/env/ConfigurableEnvironment
2015-06-04 09:58:25.075:WARN::Error starting handlers
java.lang.NoClassDefFoundError: org/springframework/core/env/ConfigurableEnvironment
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2483)
at java.lang.Class.getConstructor0(Class.java:2793)
at java.lang.Class.getDeclaredConstructor(Class.java:2043)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:105)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:348)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:281)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at runjettyrun.Bootstrap.main(Bootstrap.java:275)
2015-06-04 09:58:25.088:INFO::Started SelectChannelConnector@0.0.0.0:80
2015-06-04 09:58:25.089:INFO::Started Ajp13SocketConnector@0.0.0.0:8009
2015-06-04 09:58:25.089:INFO::AJP13 is not a secure protocol. Please protect port 8009


(2)分析:

       缺少了jar包--spring-core-4.3.12.RELEASE.jar,导入项目路径后解决Bug。



阅读更多

没有更多推荐了,返回首页