Configuration Problem: Spring NamespaceHandler for [http://www.springframework.org/schema/mvc]

Configuration Issue: It is not possible to find Spring namespace namespace for XML schema space [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"> 
+7
source share
3 answers

@Tijo

You need to check a few things:

  • Is Spring 3.0 used? You refer 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.

  • Perhaps you already have all the necessary JAR paths in the build path, most likely as โ€œLinked Librariesโ€ by adding external JAR files to your build path. You also need to store all the JARs in the webapp folder WEB_INF / lib / (put them in this folder directly, and not in the WEB-INF / lib / subfolder). Only then does your web server know about them. This is what God means.

  • It is more subtle. Make sure you do not have multiple versions of the Spring JAR in the WEB-INF / lib folder.

These are the same steps that you need to check for other NameSpaceHandler errors, for example

 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 this helps!

+8
source

Spring requires a NamespaceHandler in the class path (runtime), which can handle the mvc: namespace. This is MvcNamespaceHandler and it is located in spring-webmvc-xx.jar . Put this on your class path.

+2
source

Have you looked at that?

maven shade plugin or is it maven shade 2 plugin

He solved my problem with finding xml's spring context. link

0
source

All Articles