Announcement Announcement Module
Collapse
No announcement yet.
STS 2.9.2 XML ns validation error for applicationContext-security.xml Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • STS 2.9.2 XML ns validation error for applicationContext-security.xml

    I'm struggling to make this error make this error go away on my STS 2.9.2 appContext-security.xml. Obviously, the project compiles fine and behaves fine within the TC container aswell.

    Just cant get rid of the pesky error: This is against my http tag
    Multiple annotations found at this line:
    - schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/security/spring-security-3.0.xsd', because 1) could not find the document; 2)
    the document could not be read; 3) the root element of the document is not <xsd:schema>.
    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'http'.
    there is a similar one which shows up once in a while for my authentication manager tag as well
    cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'authentication-manager'.
    the relevant contents my appContext-security.xml are below.


    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <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"
                 xmlns:context="http://www.springframework.org/schema/context"
                 xsi:schemaLocation="http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
               http://www.springframework.org/schema/context
               http://www.springframework.org/schema/context/spring-context-3.0.xsd
               http://www.springframework.org/schema/security
               http://www.springframework.org/schema/security/spring-security-3.0.xsd">
               
    	<context:annotation-config/>
        
        <context:spring-configured/>
    
    	
        <!--  key configuration here is an entry point to be used by security intercepts -->
        <http realm="Sample Realm" entry-point-ref="authenticationEntryPoint" auto-config="false">
    
            <custom-filter ref="sessionManagementFilter" before="SESSION_MANAGEMENT_FILTER" />
            <!-- any role that is used to protect a directory, can be multiples -->
            <intercept-url pattern='/secure/**' access='ROLE_READER' />
    
            <!-- enable form login to use UsernamePasswordAuthenticationFilter [/j_spring_security_check] -->
            <form-login login-page="/general/logins/htmlLogin.faces"  
                        authentication-failure-url="/general/logins/loginFailed.jsf"/>
    
            <!-- logout page uses the default LogoutFilter, no changes are needed as IT accepts a GET call... -->
            <!-- here is an example logout link:
                    <a href="#{request.contextPath}/j_spring_security_logout">Logout</a> -->
            <logout logout-url="/j_spring_security_logout"
                    logout-success-url="/general/main.jsf"
                    invalidate-session="true"/>
        </http>
    
        <beans:bean id="authenticationEntryPoint"
            class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint">
            <beans:property name="loginFormUrl" value="/general/logins/login.jsf" />
        </beans:bean>
        
       
        <authentication-manager alias="authenticationManager">
        	<authentication-provider>
                <user-service>
                    <user name="test" password="pass" authorities=""/>
                </user-service>
            </authentication-provider>
            
            <authentication-provider ref="customAuthProvider"/>
        </authentication-manager>
    any inputs appreciated!

  • #2
    Hey!

    I've seen similar errors before, but those where related to unversioned XSD definitions. I also guess that you have all the libs on the classpath of your project, right?

    Can you attach a sample project that reproduces the problem? That would be great!
    I really would like to take a look at this in more detail...

    Thanks for your help!
    -Martin

    Comment

    Working...
    X