Nope, I still get the same exception about wanting a Comparator but getting a string. Thanks.
S. Ali Tokmen-4 wrote: > > Hello > > Please try the full class name (with package). > > For example: sorter=org.apache.camel.sorter.DPIFileSorter > > Cheers > > S. Ali Tokmen > [email protected] > > Office: +33 4 76 29 76 19 > GSM: +33 66 43 00 555 > > Bull, Architect of an Open World TM > http://www.bull.com > > > Le 26/03/2010 16:36, sub3 a écrit : >> Hi, >> 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; >> try{ >> jcontext = new JndiContext(); >> jcontext.bind("DeadLetterChannelProcessor", >> DeadLetterChannelProcessor.getInstance()); >> jcontext.bind("DPIFileSorter", new DPIFileSorter()); >> } catch (Exception e){ >> logger.error("Unable to create camel context in >> MultiFormatDPI", e); >> } >> >> from("file://"+dir+"?delete=true&sorter=#DPIFileSorter"). >> >> errorHandler(deadLetterChannel("bean:DeadLetterChannelProcessor?method=handleError").maximumRedeliveries(1)).process(new >> Processor() { >> public void process(Exchange e) { >> try { >> File file = >> (File)e.getIn().getBody(File.class); >> logger.info("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: http://old.nabble.com/How-do-I-specify-sorting-in-file-component--tp28044191p28044761.html Sent from the Camel - Users mailing list archive at Nabble.com.
