Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is no need to use the classpath: protocol in your schemaLocation URL if the namespace is configured correctly and the XSD file is on your classpath.</p> <p>Spring doc "<a href="http://static.springsource.org/spring/docs/3.0.5.RELEASE/spring-framework-reference/html/extensible-xml.html#extensible-xml-registration" rel="noreferrer">Registering the handler and the schema</a>" shows how it should be done. </p> <p>In your case, the problem was probably that the spring-context jar on your classpath was not 2.1. That was why changing the protocol to classpath: and putting the specific 2.1 XSD in your classpath fixed the problem. </p> <p>From what I've seen, there are 2 schemas defined for the main XSD contained in a spring-* jar. Once to resolve the schema URL with the version and once without it.</p> <p>As an example see this part of the spring.schemas contents in spring-context-3.0.5.RELEASE.jar:</p> <pre><code>http\://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd http\://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd http\://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.0.xsd </code></pre> <p>This means that (in xsi:schemaLocation) </p> <pre><code>http://www.springframework.org/schema/context/spring-context-2.5.xsd </code></pre> <p>will be validated against </p> <pre><code>org/springframework/context/config/spring-context-2.5.xsd </code></pre> <p>in the classpath. </p> <pre><code>http://www.springframework.org/schema/context/spring-context-3.0.xsd </code></pre> <p>or</p> <pre><code>http://www.springframework.org/schema/context/spring-context.xsd </code></pre> <p>will be validated against</p> <pre><code>org/springframework/context/config/spring-context-3.0.xsd </code></pre> <p>in the classpath.</p> <pre><code>http://www.springframework.org/schema/context/spring-context-2.1.xsd </code></pre> <p>is not defined so Spring will look for it using the literal URL defined in schemaLocation.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload