0

I m getting the following exception while trying to deploy the war file on Weblogic 10.3.6 server.

The application is using SPring mvc.

Error loading DispatcherServlet's default strategy class [org.springframework.web.servlet.mvc.support.Def aultHandlerExceptionResolver] for interface [org.springframework.web.servlet.HandlerExceptionResolver]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/web/bind/MethodArgumentNotValidException at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategies(DispatcherServlet.java:766) at org.springframework.web.servlet.DispatcherServlet.initHandlerExceptionResolvers(DispatcherServlet.java:604) at org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:423) at org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:410) at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:752) at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:989) at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:1) at org.springframework.context.event.GenericApplicationListenerAdapter.onApplicationEvent(GenericApplicationListenerAdapter.java:51) at org.springframework.context.event.SourceFilteringListener.onApplicationEventInternal(SourceFilteringListener.java:97) at org.springframework.context.event.SourceFilteringListener.onApplicationEvent(SourceFilteringListener.java:68) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:324) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:929) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:467)

vaibhavaj2
  • 105
  • 2
  • 10

1 Answers1

1

Your classpath doesn't have spring-web-x.x.x.jar, that's why the exception is. Please use Maven build tool for building your Spring MVC project. Add all the necessary dependencies in pom.xml. For spring-web 3.0.4 version, it would be

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-web</artifactId>
    <version>3.0.4.RELEASE</version>
</dependency>
Keerthivasan
  • 12,760
  • 2
  • 32
  • 53
  • resolved the issue. I was using 3.1.0Release jar . But the spring jars in the proj were of the version 3.1.0.RC1. – vaibhavaj2 Nov 28 '13 at 13:33