Announcement Announcement Module
Collapse
No announcement yet.
Failed to read schema document Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      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

      Comment

      Working...
      X