org.apache.camel.xml.io.XmlPullParserException: Unexpected element '{http://camel.apache.org/schema/spring}from'

Solution Verified - Updated -

Environment

  • Red Hat Fuse
    • 6.x
    • 7.x
  • Red Hat Integration-Camel Extensions for Quarkus
  • 2.x

Issue

  • The Camel application fails to start with the following Exception:
org.apache.camel.xml.io.XmlPullParserException: Unexpected element '{http://camel.apache.org/schema/spring}from'

Resolution

  • The camel endpoints such as (from and to ) should be surrounded by the tag, like so:
<route>
        <from uri="direct:source" />
        <to uri="direct:target" />
</route>      

Root Cause

  • This exception occurs when the camel endpoints (from, to, etc) are not surrounded by the tag.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments