camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexbp <>
Subject Using camel file component within a jar to read a file
Date Mon, 28 Sep 2009 20:10:13 GMT


I have a camel route configuration where an xml data file is read from a
filesystem and then it's contents are placed into jms topic. The
configuration works when started from Eclipse, however when the entire
project is packaged as a jar file with dependencies, Camel does not seem to
locate the data file.

Here is an example of a route I am using :

<from uri="file://data/xml_data_file.xml?noop=true"/>
<convertBodyTo type="java.lang.String"/>
<to uri="proxy://classname ?method=inputMethod"/>

The data file xml_data_file is located within src/main/resources/data, and
is included in the jar's classpath.

Is the syntax correct ?

Are there any extra steps required to configure camel so it can locate the
file from whithin the jar?

Thank you.
View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message