Results 1 to 6 of 6

Thread: M2: Unable to locate Spring NamespaceHandler...

  1. #1
    Join Date
    Jun 2009
    Posts
    17

    Question M2: Unable to locate Spring NamespaceHandler...

    Hello,
    Why do I keep getting a

    Code:
    Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
    error when I try to run my web project?
    I have the following maven dependencies in my POM file:

    Code:
    	<dependencies>
    		<dependency>
    			<groupId>javax.servlet</groupId>
    			<artifactId>servlet-api</artifactId>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>commons-codec</groupId>
    			<artifactId>commons-codec</artifactId>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>org.springframework.web</artifactId>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>org.springframework.web.servlet</artifactId>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework.security</groupId>
    			<artifactId>spring-security-core</artifactId>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework.security</groupId>
    			<artifactId>spring-security-config</artifactId>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework.security</groupId>
    			<artifactId>spring-security-taglibs</artifactId>
    		</dependency>
    	</dependencies>
    Spring Version: 3.0.0.M4
    Spring Security Version: 3.0.0.M2

    Thank you,
    Sammy

  2. #2
    Join Date
    Sep 2004
    Location
    Manchester, NH
    Posts
    1,236

    Default

    How is your XML file referencing the schema?
    Peter Mularien | Blog
    Author, Spring Security 3 (Book) - Packt Publishing, Available in print and eBook form
    SCJP 5, Oracle DBA
    Any postings are my own opinion, and should not be attributed to my employer or clients.


  3. #3
    Join Date
    Jun 2009
    Posts
    17

    Default

    Code:
    <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    		http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
    There you go!

  4. #4
    Join Date
    Feb 2009
    Posts
    16

    Default

    is the spring-security-config-3.0.0.M2.jar in your classpath?

  5. #5
    Join Date
    Jun 2009
    Posts
    17

    Default

    Yes of course, it had been downloaded by maven and put into my WEB-INF/lib folder as normal.

  6. #6
    Join Date
    Jun 2009
    Posts
    17

    Default

    The problem was due to AntUrlPathMatcher not being found.
    I included spring-security-web package which solved the problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •