You can use message filter and skip if the split index == 0 On Fri, Jul 31, 2015 at 10:59 AM, fxthomas <[email protected]> wrote: > hanks Claus worked line a Charm. > > But i got stuck on the CSV format. > I have changed the XML to below, since I want to skip the First line of the > CSV and skipFirstLine is not present in the version 2.15.1. > > <split id="splitCSV" streaming="true" parallelProcessing="true"> > <tokenize token="\n"/> <unmarshal> <csv > formatName="EXCEL" skipHeaderRecord="true"/> > </unmarshal> <process ref="CustomProcessorCSV"/> > I get the below error, But if I remove skipHeaderRecord attribute it works > fine but I get the Firts lien too. > Is there anyway I can get the first line skipped. > > java.lang.IllegalArgumentException: The header contains a duplicate name: > "00" in XXXXX 117, GAP220, > at > org.apache.commons.csv.CSVParser.initializeHeader(CSVParser.java:406)[commons-csv-1.1.jar:1.1] > at > org.apache.commons.csv.CSVParser.<init>(CSVParser.java:283)[commons-csv-1.1.jar:1.1] > at > org.apache.commons.csv.CSVParser.<init>(CSVParser.java:251)[commons-csv-1.1.jar:1.1] > at > org.apache.camel.dataformat.csv.CsvUnmarshaller$BulkCsvUnmarshaller.unmarshal(CsvUnmarshaller.java:92)[camel-csv-2.15.1.jar:2.15.1] > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Error-in-Tokenize-in-XMl-DSL-tp5770135p5770146.html > Sent from the Camel - Users mailing list archive at Nabble.com.
-- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2nd edition: http://www.manning.com/ibsen2
