Hi all,
it looks like camel-bindy does not take into account the class specified in
the method:

    bindy(BindyType.Csv, MyCamelBeans.TEST.class)

I have class MyCamelBeans which includes several "bindies" among which I
have a really simple MyCamelBeans.TEST:

    class MyCamelBeans {
        @CsvRecord(separator=";",isOrdered=true)
        public static final class TEST {
            @DataField(trim=true,pos=  1) public String tradingDate;
            @DataField(trim=true,pos=  2) public String isinCode;
        }

        ... some other @CsvRecord ....
    }

I also have some @FixedLengthRecord classes defined in the same package.
If I run the following route:

   
from("file:data/test?noop=true&idempotent=true&fileName=test.csv&delay=60000")
        .split(body(String.class).tokenize("\n")).streaming()
        .unmarshal().bindy(BindyType.Csv, MyCamelBeans.TEST.class)
        .to("log:DS?level=INFO&showHeaders=true");

Camel (2.10.3) fails with an NPE:

    java.lang.NullPointerException
            at
org.apache.camel.dataformat.bindy.BindyCsvFactory.setDefaultValuesForFields(BindyCsvFactory.java:583)
            at
org.apache.camel.dataformat.bindy.BindyCsvFactory.bind(BindyCsvFactory.java:230)

if I remove the other bindies, camel-bindy works as expected.
It looks like camel ignore the class specified in the fluent method
bindy(type,class): am I wrong?

thx - Luca






--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-bindy-bindy-ignore-bean-class-type-tp5725275.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to