Hello everybody,

I use Camel 2.2 (the fuse version) and try to process a file which has a fix
length format. This file format doesn't use a separator, because it's not
necessary.
A sample line could looks like:

{code}
4711123456789065432109876543219999999999999999
{code}

4711 is the companyId
1234567890 is the cardProgram
6543210987654321 is the accountNumber
9999999999999999 is the cardNumber

I created a POJO with the Camel bindy annotations:

{code}
@CsvRecord(separator = "")
public class CSVRecord implements Serializable {
        
    @DataField(pos = 1, length = 4)
    private String companyId;
        
    @DataField(pos = 2, length = 10)
    private String cardProgram;

    @DataField(pos = 3, length = 16)
    private String accountNumber;
        
    @DataField(pos = 4, length = 16)
    private String cardNumber;

   // getter and setter
}
{code}

but I received an Exception:
java.lang.IllegalArgumentException: The separator has not been defined in
the annotation @CsvRecord or not instantiated during initModel. must be
specified and not empty

I found no other solution to success my requirements. Any idea?
Or is this a new feature/improvement for Camel Bindy and I should create a
JIRA ticket?

Thanks,
Christian
-- 
View this message in context: 
http://old.nabble.com/camel-bindy%3A-not-possible-to-process-fix-length-records-without-separators--tp28584909p28584909.html
Sent from the Camel Development mailing list archive at Nabble.com.

Reply via email to