org.xml.sax.SAXParseException: Failed to read camel-spring-2.23.2.xsd
Issue
- Within the camel-context.xml file, I have set the camel-spring-2.23.2.xsd and included a setHeader element:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring-2.23.2.xsd">
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<route id="simple-route">
<from id="route-timer" uri="timer://foo?period=1000"/>
<setHeader headerName="SOURCE_SYSTEM">
<constant>VBS</constant>
</setHeader>
<setBody id="route-setBody">
<simple>Hello World from camel-context.xml</simple>
</setBody>
<log id="route-log" message=">>> ${body}"/>
</route>
</camelContext>
</beans>
- The XSD file should be loaded from the Fuse JAR files. However, if we disconnect from the network, you can see that it fails to load the XSD:
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://camel.apache.org/schema/spring/camel-spring-2.23.2.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>.
. . . . .
Caused by: java.net.UnknownHostException: camel.apache.org
Environment
- Red Hat Fuse 7.9
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.