简体   繁体   中英

Java ClassNotFoundException while running spring mvc web-app

I have created one dynamic web project using spring MVC. But while running it on server I got the below exception.SEVERE:

java.lang.NoClassDefFoundError: org/springframework/core/env/ConfigurableEnvironment
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
    at java.lang.Class.getConstructor0(Class.java:2699)
    at java.lang.Class.getDeclaredConstructor(Class.java:1985)
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:104)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(Contex tLoader.java:348)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:281)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException: 
org.springframework.core.env.ConfigurableEnvironment
06-Apr-2016 07:00:39 org.apache.catalina.core.StandardContext listenerStart

SEVERE: Exception sending context initialized event to listener instance of 
class org.springframework.web.context.ContextLoaderListener

java.lang.NoClassDefFoundError: org/springframework/core/env/ConfigurableEnvironment
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)

For your reference here are the jars that I used.

    spring-asm-3.0.7.RELEASE.jar
    spring-beans-3.0.7.RELEASE.jar
    spring-context-3.0.7.RELEASE.jar
    spring-core-3.0.7.RELEASE.jar
    spring-expression-3.0.7.RELEASE.jar
    spring-web-3.0.7.RELEASE.jar
    spring-webmvc-3.0.7.RELEASE.jar
    commons-logging-api-1.1.jar
    jstl-1.2.jar

根据文档,该类自版本3.1起可用,但您有3.0。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM