camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aida <ai.d...@gmail.com>
Subject [Bindy] Having trouble with the "required" field
Date Tue, 27 Mar 2012 07:58:05 GMT
Hi,

I'm using bindy for parsing files, but I'm having problems with the
"required" option (by default set to false). 

Camel version: 2.9.1	
kind of file being processed: csv
separator : \t
number of classes (for map from file to object): only 1

My problem comes when I try to process a file with missing fields. For
example if it processes ok a line like this:

DATA1\tDATA2\tDATA3\n

Processing the following line throws an exception, even though the fields
are not required:

DATA1\t\t\n

I have tried also putting blankspaces " " instead of the data, and writing
explicity the required=false option in each DataField. 


Maybe I'm missing something stupid or I'm not understanding the usage of
that option correctly, but I have built an unitary test and tried with some
combinations with no results. 

The message of the error is : "Some fields are missing (optional or
mandatory)" what makes me think that optional fields maybe must have also
data in the file, could it be?


Thanks in advance.

--
View this message in context: http://camel.465427.n5.nabble.com/Bindy-Having-trouble-with-the-required-field-tp5597196p5597196.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message