Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring 3.0 - Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]

Any ideas what could be the cause of this?

Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]

org.springframework.web.context.ContextLoader initWebApplicationContext: Context initialization failed org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security] Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml] 

This is my applicationContext.xml:

<?xml version="1.0" encoding="UTF-8"?> <beans:beans xmlns="http://www.springframework.org/schema/security"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xmlns:beans="http://www.springframework.org/schema/beans"     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/security         http://www.springframework.org/schema/security/spring-security-3.0.xsd"> ... </beans:beans> 

In my pom.xml I have:

<dependency>     <groupId>org.springframework.security</groupId>     <artifactId>spring-security-core</artifactId>           <version>3.0.1.RELEASE</version> </dependency> <dependency>     <groupId>org.springframework.security</groupId>     <artifactId>spring-security-openid</artifactId>     <version>3.0.1.RELEASE</version> </dependency> 
like image 692
Taylor Leese Avatar asked Jan 29 '10 09:01

Taylor Leese


1 Answers

I needed to add an additional Maven dependency:

    <dependency>         <groupId>org.springframework.security</groupId>         <artifactId>spring-security-config</artifactId>         <version>3.0.1.RELEASE</version>     </dependency> 
like image 123
Taylor Leese Avatar answered Sep 23 '22 13:09

Taylor Leese