Results 1 to 3 of 3

Thread: Failed to read schema document

  1. #1
    Join Date
    Nov 2008
    Posts
    17

    Question Failed to read schema document

    For some reason I get the the following error when starting my application:

    Code:
    SimpleSaxErrorHandler - Method: warning - Ignored XML validation warning
    [INFO] org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/security/spring-security-2.0.4.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>.
    The strange thing is that I didn't change anything on my application and all off a sudden this error occurs. My configuration looks like this:

    Code:
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:security="http://www.springframework.org/schema/security"
    	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-2.0.xsd
                  http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">

    I also tried this but that didn't work either:
    Code:
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:security="http://www.springframework.org/schema/security"
    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.3.xsd">
    I checked the URL's and they seem to be correct when I access them in the browser the xsd shows normally.

    Does anybody know what I might be doing wrong?

  2. #2
    Luke Taylor is offline Senior Member Acegi Security System TeamSpring Team
    Join Date
    Aug 2004
    Location
    Glasgow, Scotland
    Posts
    3,449

    Default

    Which version of Spring Security are you using? You can't use a 2 schema with 3 or vice-versa. If you're using 3.0, make sure you have the spring-security-config jar on your classpath.
    Spring - by Pivotal
    twitter @tekul

  3. #3
    Join Date
    Nov 2008
    Posts
    17

    Default

    That seemed to solve it. We changed our dependency approach in Maven so this JAR wasn't on the classpath in the application anymore. Thnx for pointing this out

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •