Hi Can you enable to DEBUG org.apache.camel.dataformat.bindy (log4j, ...) to control which classes (= models) have been loaded by camel on your linux machine ?
Regards, Charles On Thu, Aug 16, 2012 at 3:17 PM, houssemgaga <belhassine.hous...@gmail.com>wrote: > Hello, > > I use the library Bindy for quite some time, and she is great . > However, I recently found a problem. Let me explain: > I'm developing on Windows machine, everything goes well. Once deployed on > the target machine (Linux), csv files generated are not correct: the header > is not good. > In fact, I created for each file type csv a model object, in each package > separately. There are common fields between the models and the concern > comes > from there: camel-bindy is lost when generating the header. The generated > header contains fields that come from another model. > > An example : > *Model 1 :* > @CsvRecord(separator=";", generateHeaderColumns=true, skipFirstLine=true) > public class OpportunityDTO implements Serializable{ > > /** > * > */ > private static final long serialVersionUID = 1L; > > @DataField(columnName = "OpportunityId", pos = 1 ) > String opportunityId; > > @DataField(columnName = "AccountId", pos = 2 ) > String accountId; > > @DataField(columnName = "Country", pos = 3 ) > String country; > > @DataField(columnName = "OpportunityType", pos = 4 ) > String opportunityType; > > @DataField(columnName = "ValidStartDate", pos = 5, pattern > ="\"dd/MM/yyyy\"" ) > Date validStartDate; > > @DataField(columnName = "ValidEndDate", pos = 6, pattern > ="\"dd/MM/yyyy\"" > ) > Date validEndDate; > > @DataField(columnName = "OpportunityCurrency", pos = 7 ) > String opportunityCurrency; > > @DataField(columnName = "ParentOpportunityId", pos = 8 ) > String parentOpportunityId; > > @DataField(columnName = "SalesMonitoring", pos = 9 ) > String salesMonitoring; > > // Getter and setter > } > > *Model 2 :* > @CsvRecord(separator=";", generateHeaderColumns=true, > skipFirstLine=true) > public class OpportunityLeaserDTO { > > @DataField(columnName = "OpportunityId", pos = 1 ) > String opportunityId; > > @DataField(columnName = "LeaserId", pos = 2 ) > String leaserID; > > @DataField(columnName = "ValidStartDate", pos = 3, pattern > ="\"dd/MM/yyyy\"" ) > Date validStartDate; > > @DataField(columnName = "ValidEndDate", pos = 4, pattern > ="\"dd/MM/yyyy\"" > ) > Date validEndDate; > // Getter and setter > } > > > > For the first model "OpportunityDTO", the header is incorrect and generated > as follows: > > OpportunityId;*LeaserId*;*ValidStartDate*;*ValidEndDate*;Country;ValidStartDate;ValidEndDate;ParentOpportunityId;SalesMonitoring > > For the second model "OpportunityLeaserDTO" the generated header is correct > > I still do not understand where is the problem and why only on linux??? > > I use the latest release of Bindy: 2.10.0 > > Thank you for your support. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Bindy-CSV-Header-is-incorrect-tp5717531.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Charles Moulliard Apache Committer / Sr. Pr. Consultant at FuseSource.com Twitter : @cmoulliard Blog : http://cmoulliard.blogspot.com