1
votes

My spring security.xml

<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-3.0.xsd
        http://www.springframework.org/schema/security
        http://www.springframework.org/schema/security/spring-security-3.2.xsd">
    <http auto-config="true"> 
        <intercept-url pattern="/admin**" access="ROLE_USER" /> 
    </http> 
    <authentication-manager>
        <authentication-provider>
            <user-service>
                <user name="suvajit" password="123456" authorities="ROLE_USER" />
            </user-service>
        </authentication-provider>
    </authentication-manager>
</beans:beans>

i am using

org.springframework.security.config-3.0.3.RELEASE.jar
org.springframework.security.core-3.0.3.RELEASE.jar
org.springframework.security.web-3.0.2.RELEASE.jar

for spring security..

It is giving me compilation error

cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'authentication-manager

and multiple annotations found at this line:

  • schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/security/ spring-security-3.2.xsd', because
    1. could not find the document;
    2. the document could not be read;
    3. the root element of the document is not .
  • cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'http'.

for authentication-manager and http tags respectively

please clarify me where i am wrong

1

1 Answers

2
votes

Your jars are

  • org.springframework.security.config-3.0.3.RELEASE.jar
  • org.springframework.security.core-3.0.3.RELEASE.jar
  • org.springframework.security.web-3.0.2.RELEASE.jar

But your xml document references version 3.2 - make them compatible, by upgrading your jars to 3.2.3 RELEASE version.