this is probably a simple mis configuration problem but I am having an issue with my xml document picking up my tag. I am getting the error
"Multiple annotations found at this line: - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'camelContext'. - Unable to locate Spring NamespaceHandler for element 'camelContext' of schema namespace 'http://activemq.apache.org/camel/"
But when I add in the namespace I get the following error:
Multiple annotations found at this line: - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'camelContext'. - schema_reference.4: Failed to read schema document 'http://activemq.apache.org/camel/schema/spring/camel-spring.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not . - Unable to locate Spring NamespaceHandler for element 'camelContext' of schema namespace 'http://activemq.apache.org/camel/schema/spring'
Can anyone help me figure out why I am getting both of these issues? I am not expert in xml or camel so any help would be greatly appreciated. Below is my simple xml document:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="myrouter" class="org.apache.camel.example.reportincident.ReportIncidentRoutes"/>
<!-- Camel Configuration -->
<camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
<routeBuilderRef ref="myrouter"/>
</camelContext>
</beans>
In Camel 1.x the namespace for the XML is the one that start with activemq, eg
xmlns="http://activemq.apache.org/camel/schema/spring"
In Camel 2.x the namespace for the XML is pure Camel, eg
http://camel.apache.org/schema/spring
As Camel 1.x is EOL I assume you are using Camel 2.x. And if so you need to change t he namespace in the < camelContext > tag to the 2.x style. And remove the old reference as well in the top of your XML file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With