title: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
body: <p>I am developing my first application in spring security. My applicationContext-security.xml file looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;!--
    -  Namespace-based OpenID configuration
    --&gt;
  
  &lt;b:beans xmlns="http://www.springframework.org/schema/security"
      xmlns:b="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-3.0.xsd
                          http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"&gt;
  
      &lt;http&gt;
          &lt;intercept-url pattern="/**" access="ROLE_USER"/&gt;
          &lt;intercept-url pattern="/index.xhtml*" filters="none"/&gt;
          &lt;logout/&gt;
          &lt;openid-login login-page="/index.xhtml" authentication-failure-url="/index.xhtml?login_error=true"&gt;
              &lt;attribute-exchange&gt;
                  &lt;openid-attribute name="email" type="http://schema.openid.net/contact/email" required="true" count="2"/&gt;
                  &lt;openid-attribute name="name" type="http://schema.openid.net/namePerson/friendly" /&gt;
              &lt;/attribute-exchange&gt;
          &lt;/openid-login&gt;
          &lt;remember-me token-repository-ref="tokenRepo"/&gt;
      &lt;/http&gt;
  
      &lt;b:bean id="tokenRepo"
              class="org.springframework.security.web.authentication.rememberme.InMemoryTokenRepositoryImpl" /&gt;
  
      &lt;authentication-manager alias="authenticationManager"/&gt;
  
      &lt;user-service id="userService"&gt;
          &lt;user name="http://user.myopenid.com/" authorities="ROLE_SUPERVISOR,ROLE_USER" /&gt;
      &lt;/user-service&gt;
  
  &lt;/b:beans&gt;
  </code></pre>
  
  <p>and Web.xml file is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"&gt;
  
      &lt;display-name&gt;Spring Security OpenID Demo Application&lt;/display-name&gt;
  
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;
              /WEB-INF/applicationContext-security.xml
          &lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;context-param&gt;
          &lt;param-name&gt;log4jConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;/WEB-INF/classes/log4j.properties&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;context-param&gt;
          &lt;param-name&gt;webAppRootKey&lt;/param-name&gt;
          &lt;param-value&gt;openid.root&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;filter&gt;
          &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
          &lt;filter-class&gt;org.springframework.web.filter.DelegatingFilterProxy&lt;/filter-class&gt;
      &lt;/filter&gt;
  
      &lt;filter-mapping&gt;
        &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
        &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/filter-mapping&gt;
  
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.util.Log4jConfigListener&lt;/listener-class&gt;
      &lt;/listener&gt;
       &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;faces/index.xhtml&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Clean and Build of the application is successful, but when I try to deploy the application jetty 7 gives me following error:</p>
  
  <blockquote>
    <p>SEVERE: Context initialization failed<br>
    org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [<a href="http://www.springframework.org/schema/security]">http://www.springframework.org/schema/security]</a><br>
    Offending resource: ServletContext resource [/WEB-INF/applicationContext-security.xml]<br>
    at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)<br>
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)<br>
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)  </p>
  </blockquote>
  
  <p>Tried everything but can't solve this error. Any help would be appreciated.</p>
  
  <p><strong>EDIT</strong>
  I tried added 3.0.2 version of the Spring-Security and got this:</p>
  
  <blockquote>
    <p>Context initialization failed<br>
    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 13 in XML document from ServletContext resource [/WEB-INF/applicationContext-security.xml] is invalid;<br>
    nested exception is org.xml.sax.SAXParseException; lineNumber: 13; columnNumber: 11; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'http'.
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)<br>
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334</p>
  </blockquote>