0 Replies Latest reply on Feb 10, 2012 10:33 AM by vs.souza

    The separator has not been defined in the annotation @CsvRecord

    vs.souza

      Hello fellows,

       

      I am working with ServiceMix 4.4.0 and camel 2.8.3. I created a bundle to unmarshal csv file using Bindy but when I try to parse the file the following message is added to ServiceMix log:

       

      13:06:52,888 | ERROR | Env/Sandbox/From | DefaultErrorHandler              | 90 - org.apache.camel.camel-core - 2.8.3 | Failed delivery for exchangeId: ID-deathstar-42316-1328886400172-0-1. Exhausted after delivery attempt: 1 caught: java.lang.IllegalArgumentException: The separator has not been defined in the annotation @CsvRecord or not instantiated during initModel. must be specified

      java.lang.IllegalArgumentException: The separator has not been defined in the annotation @CsvRecord or not instantiated during initModel. must be specified

           at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:279)[90:org.apache.camel.camel-core:2.8.3]

           at org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat.unmarshal(BindyCsvDataFormat.java:122)[171:org.apache.camel.camel-bindy:2.8.3]

           at org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:57)[90:org.apache.camel.camel-core:2.8.3]

           at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[90:org.apache.camel.camel-core:2.8.3]

       

      I defined the separator attribute (as displayed bellow in my bean sigature) but I keep receiving this error:

       

      @CsvRecord(separator=",", quote="\"")

      public class CsvFileRecordBean implements Serializable{

      ...

       

      Do you guys have any ideas about how to solve this problem?

       

      Thanks and my best regards.