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
Unable to locate Spring NamespaceHandler for XML schema namespace
http://www.springframework.org/schema/context
or
Unable to locate Spring NamespaceHandler for XML schema namespace
[http://www.springframework.org/schema/security]
Hope that helps!
Spring needs a NamespaceHandler
on the (runtime) classpath that can handle the mvc:
namespace. This is the MvcNamespaceHandler
, and it is located in the spring-webmvc-xx.jar
. Put that on your classpath.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With