camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sub3 <>
Subject How do I specify sorting in file component?
Date Fri, 26 Mar 2010 15:36:36 GMT

Can someone tell me what I am doing wrong.  I am using the File component
and I am trying to make the incoming files come in in order.  However, I
don't know how to specify the sorter.

context.addRoutes(new RouteBuilder() {
	public void configure() {
		JndiContext jcontext = null;
			jcontext = new JndiContext();
			jcontext.bind("DPIFileSorter", new DPIFileSorter());
		} catch (Exception e){
			logger.error("Unable to create camel context in MultiFormatDPI", e);
Processor() {
			public void process(Exchange e) {
				try {
					File file = (File)e.getIn().getBody(File.class);"Filename: " + file.toString());

It is in the context and I reference it with either DPIFileSorter or
#DPIFileSorter, but I still get:
Caused by: java.lang.IllegalArgumentException: Could not find a suitable
setter for property: sorter as there isn't a setter methd with same type:
java.lang.String nor type conversion possible: No type converter available
to convert from type: java.lang.Strig to the required type:
java.util.Comparator with value DPIFileSorter

Thanks for your help.
View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message