Using camel-exist w/ Spring XML

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Using camel-exist w/ Spring XML

Steve A.
I'm trying to use camel-exist with a Spring XML configuration, but I'm getting the following error:

ERROR Failed: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 13 in XML document from file [...] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'from'. One of '{"http://activemq.apache.org/camel/schema/spring":aggregator, "http://activemq.apache.org/camel/schema/spring":bean, "http://activemq.apache.org/camel/schema/spring":catch, "http://activemq.apache.org/camel/schema/spring":choice, "http://activemq.apache.org/camel/schema/spring":when, "http://activemq.apache.org/camel/schema/spring":otherwise, "http://activemq.apache.org/camel/schema/spring":convertBodyTo, "http://activemq.apache.org/camel/schema/spring":delayer, "http://activemq.apache.org/camel/schema/spring":onException, "http://activemq.apache.org/camel/schema/spring":filter, "http://activemq.apache.org/camel/schema/spring":finally, "http://activemq.apache.org/camel/schema/spring":handleFault, "http://activemq.apache.org/camel/schema/spring":interceptor, "http://activemq.apache.org/camel/schema/spring":idempotentConsumer, "http://activemq.apache.org/camel/schema/spring":intercept, "http://activemq.apache.org/camel/schema/spring":loadBalance, "http://activemq.apache.org/camel/schema/spring":marshal, "http://activemq.apache.org/camel/schema/spring":multicast, "http://activemq.apache.org/camel/schema/spring":pipeline, "http://activemq.apache.org/camel/schema/spring":policy, "http://activemq.apache.org/camel/schema/spring":proceed, "http://activemq.apache.org/camel/schema/spring":process, "http://activemq.apache.org/camel/schema/spring":recipientList, "http://activemq.apache.org/camel/schema/spring":resequencer, "http://activemq.apache.org/camel/schema/spring":route, "http://activemq.apache.org/camel/schema/spring":routingSlip, "http://activemq.apache.org/camel/schema/spring":setBody, "http://activemq.apache.org/camel/schema/spring":setHeader, "http://activemq.apache.org/camel/schema/spring":setOutHeader, "http://activemq.apache.org/camel/schema/spring":splitter, "http://activemq.apache.org/camel/schema/spring":thread, "http://activemq.apache.org/camel/schema/spring":throttler, "http://activemq.apache.org/camel/schema/spring":throwFault, "http://activemq.apache.org/camel/schema/spring":to, "http://activemq.apache.org/camel/schema/spring":transform, "http://activemq.apache.org/camel/schema/spring":try, "http://activemq.apache.org/camel/schema/spring":unmarshal}' is expected.
     [java] org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 13 in ....

My route is defined as follows:

<route>
   <from uri="direct:start" />
   <to uri="xmldb:admin:///db" />
   <from uri="xmldb:admin:///db?xpath=/MetaData" />
   <to  uri="mock:results" />
</route>


I even put xmldb in src/main/resources/META-INF/services/org/apache/camel/component.

I'm obviously missing something.

Thoughts?

Steve
Reply | Threaded
Open this post in threaded view
|

Re: Using camel-exist w/ Spring XML

Jon Anstey
I think you may have meant to do this? You can only have one from per route

<route>
   <from uri="direct:start" />
   <to uri="xmldb:admin:///db" />
</route> 
<route>
   <from uri="xmldb:admin:///db?xpath=/MetaData" />
   <to  uri="mock:results" />
</route> 

Cheers,
Jon