java.lang.NullPointerException when running a Transformation with a CSV file
|Date:||21 October 2009|
|Product/Release:||LANSA Composer V2.0|
|Abstract:||java.lang.NullPointerException when running a Transformation with a CSV file that has a varying number of columns on each row|
|Submitted By:||LANSA Technical Support|
LANSA Composer has a Transformation map which processes a CSV file that has a varying number of columns on each row.
For example: A CSV has 10 data columns. However the multiple header and trailer records may only have 1 or more columns of data. i.e. Not all records/rows have all 10 columns of data.
When the mapping is run from within MapForce the transformation works fine. However when the mapping is run using the transformation via the LANSA Composer processing sequence, the following error "java.lang.NullPointerException" results and the transformation fails.
In such cases where there are empty fields in the CSV, unchecking the "Treat empty fields as absent" checkbox in the CSV component properties will cause this error to not occur.