Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/mvc].
can anyone tell why this error is happening? this is my configuration.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
@Tijo
You need to check few things:
Whether the Spring version you are using is 3.0. You are referring to spring-beans-3.0.xsd, spring-context-3.0.xsd and spring-mvc-3.0.xsd in your configuration, so you need to use Spring 3.0.* JARs.
You may already have all the required JARs in the build path, most likely as "Referenced libraries" by adding external JARs to your build path. You also need to keep all the JARs in the webapp's WEB_INF/lib/ folder (put them in that folder directly, and not in a sub-folder of WEB-INF/lib/). Only then your web server knows about them. This is what Bozho means.
This is more subtle. Make sure you do not have multiple Spring JAR versions in your WEB-INF/lib folder.
These are the same steps one needs to check for other NameSpaceHandler errors too, like
or
Hope that helps!
I was getting same error while development on Eclipse. Some time it happens that required JAR is there at the correct location, but still this error message doesn't disappear. Don't Panic. First check if any of the above answers are working for you. If its not working follow below steps if you are facing this while development on Eclipse/STS.
Issue resolved in my case.
Spring needs a
NamespaceHandler
on the (runtime) classpath that can handle themvc:
namespace. This is theMvcNamespaceHandler
, and it is located in thespring-webmvc-xx.jar
. Put that on your classpath.Have you had a look at this?
maven shade plugin or this maven shade plugin 2
It solved my problem with finding the spring context xml's.a link