Announcement Announcement Module
Collapse
No announcement yet.
M2: Unable to locate Spring NamespaceHandler... Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    How is your XML file referencing the schema?

    Comment


    • #3
      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!

      Comment


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

        Comment


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

          Comment


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

            Comment

            Working...
            X