Search
Calendar
June 2025
S M T W T F S
« May    
1234567
891011121314
15161718192021
22232425262728
2930  
Archives

Posts Tagged ‘XSD’

PostHeaderIcon org.springframework.beans.factory.xml.XmlBeanDefinitionReader: Ignored XML validation warning org.xml.sax.SAXParseException: SchemaLocation: schemaLocation value = … must have even number of URI’s

Context

Mule 2.2.1 ESB config file with a TibcoRV connector, under Windows XP SP2 and Java 5.
The error happened in this context, yet I assume it would occur in any occurence related to XSD / XML schemas.

Error

org.springframework.beans.factory.xml.XmlBeanDefinitionReader: Ignored XML validation warning
org.xml.sax.SAXParseException: SchemaLocation: schemaLocation value = 'http://www.mulesource.org/schema/mule/management/2.2                http://www.mulesource.org/schema/mule/management/2.2/mule-management.xsd                http://www.mulesource.org/schema/mule/core/2.2                http://www.mulesource.org/schema/mule/core/2.2/mule.xsd                http://www.springframework.org/schema/beans                http://www.springframework.org/schema/beans/spring-beans-2.5.xsd                http://www.mulesource.org/schema/mule/core/2.2/mule.xsd                http://www.mulesource.org/schema/mule/vm/2.2                http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd
http://www.mulesource.org/schema/mule/tibcorv/2.2                http://www.mulesource.org/schema/mule/tibcorv/2.2/mule-tibcorv.xsd' must have even number of URI's.

Headers of XML config file:

<mule xmlns=&amp;quot;http://www.mulesource.org/schema/mule/core/2.2&amp;quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:management="http://www.mulesource.org/schema/mule/management/2.2"
xmlns:tibcorv="http://www.mulesource.org/schema/mule/tibcorv/2.2
xsi:schemaLocation="http://www.mulesource.org/schema/mule/management/2.2
http://www.mulesource.org/schema/mule/management/2.2/mule-management.xsd
http://www.mulesource.org/schema/mule/core/2.2
http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
http://www.mulesource.org/schema/mule/vm/2.2
http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd
http://www.mulesource.org/schema/mule/tibcorv/2.2
http://www.mulesource.org/schema/mule/tibcorv/2.2/mule-tibcorv.xsd">

Explanation – Fix

Each time, the attribute xsi:schemaLocation must have an even number of lines: a “public” XSD address and a “non-public” one. For non English-fluent speakers, I remind that a number is even if, and only if, it is a multiple of 2 ; otherwise it is odd.

In our case, one line is redundant. To fix this issue, you have to remove the redundant line, and ensure each line belongs to a consistent pair of lines: for instance:

http://www.mulesource.org/schema/mule/tibcorv/2.2
and
http://www.mulesource.org/schema/mule/tibcorv/2.2/mule-tibcorv.xsd

PostHeaderIcon Unable to validate using XSD: Your JAXP provider does not support XML Schema

Here is the stacktrace that happened this morning:

Unable to validate using XSD: Your JAXP provider org.apache.crimson.jaxp.DocumentBuilderFactoryImpl@e6a73d does not support XML Schema. Are you running on Java 1.4 or below with Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.

To solve it, I had to remove the j2ee-X.X.jar from my project.xml Maven config file.