Impossible de localiser le Printemps NamespaceHandler pour l'espace de noms XML schema [http://www.springframework.org/schema/security]

Je suis de développer ma première application au printemps de sécurité. Mon applicationContext-security.xml fichier ressemble à ceci:

<?xml version="1.0" encoding="UTF-8"?>

<!--
  -  Namespace-based OpenID configuration
  -->

<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">

    <http>
        <intercept-url pattern="/**" access="ROLE_USER"/>
        <intercept-url pattern="/index.xhtml*" filters="none"/>
        <logout/>
        <openid-login login-page="/index.xhtml" authentication-failure-url="/index.xhtml?login_error=true">
            <attribute-exchange>
                <openid-attribute name="email" type="http://schema.openid.net/contact/email" required="true" count="2"/>
                <openid-attribute name="name" type="http://schema.openid.net/namePerson/friendly" />
            </attribute-exchange>
        </openid-login>
        <remember-me token-repository-ref="tokenRepo"/>
    </http>

    <b:bean id="tokenRepo"
            class="org.springframework.security.web.authentication.rememberme.InMemoryTokenRepositoryImpl" />

    <authentication-manager alias="authenticationManager"/>

    <user-service id="userService">
        <user name="http://user.myopenid.com/" authorities="ROLE_SUPERVISOR,ROLE_USER" />
    </user-service>

</b:beans>

et Web.xml fichier:

<?xml version="1.0" encoding="UTF-8"?>
<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">

    <display-name>Spring Security OpenID Demo Application</display-name>

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            /WEB-INF/applicationContext-security.xml
        </param-value>
    </context-param>

    <context-param>
        <param-name>log4jConfigLocation</param-name>
        <param-value>/WEB-INF/classes/log4j.properties</param-value>
    </context-param>

    <context-param>
        <param-name>webAppRootKey</param-name>
        <param-value>openid.root</param-value>
    </context-param>

    <filter>
        <filter-name>springSecurityFilterChain</filter-name>
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>

    <filter-mapping>
      <filter-name>springSecurityFilterChain</filter-name>
      <url-pattern>/*</url-pattern>
    </filter-mapping>

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    <listener>
        <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
    </listener>
     <welcome-file-list>
        <welcome-file>faces/index.xhtml</welcome-file>
    </welcome-file-list>
</web-app>

Nettoyer et créer de la demande est acceptée, mais lorsque je tente de déployer l'application de la jetée 7 me donne l'erreur suivante:

SÉVÈRE: Contexte échec de l'initialisation

org.springframework.les haricots.usine.de l'analyse.BeanDefinitionParsingException: problème de Configuration: Impossible de localiser le Printemps NamespaceHandler pour l'espace de noms XML schema [http://www.springframework.org/schema/security]

Délinquance de la ressource: ServletContext de ressources [/WEB-INF/applicationContext-security.xml]

au org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)

au org.springframework.les haricots.usine.de l'analyse.ReaderContext.erreur(ReaderContext.java:85)

au org.springframework.les haricots.usine.de l'analyse.ReaderContext.erreur(ReaderContext.java:80)

A tout essayé, mais ne peut pas résoudre cette erreur. Toute aide serait appréciée.

MODIFIER
J'ai essayé ajouté la version 3.0.2 de la collection Printemps-Sécurité et obtenu ceci:

Contexte échec de l'initialisation

org.springframework.les haricots.usine.xml.XmlBeanDefinitionStoreException: Ligne 13 dans le document XML à partir d'ServletContext de ressources [/WEB-INF/applicationContext-security.xml] n'est pas valide;

exception imbriquée est org.xml.sax.SAXParseException; lineNumber: 13; numéro de colonne: 11; cvc-complexe-type.2.4.c: La mise en correspondance générique est stricte, mais aucune déclaration ne peut être trouvé pour l'élément "http".
au org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)

au org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334

InformationsquelleAutor Amit | 2011-08-25