Search
Calendar
May 2017
S M T W T F S
« Sep    
 123456
78910111213
14151617181920
21222324252627
28293031  
Your widget title
Archives

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

Leave a Reply