When we pass a resultset for which Date is null, then it is throwing a null pointer exception.
Is there a workaround for it.
The following exception is generated when in database the DATE field is blank for a record.
We are using the following code for exporting the data to excel:
rs = stmt.executeQuery(sqlQuery);
workbookDesigner.setDataSource(excelWriteConfigDTO.getDataSourceName(),rs);
workbookDesigner.process(true);
workbookDesigner.clearDataSource();
In the above code the ResultSet object is passed to the Workbookdesigner method setDatasource. The resultset object contains a Date Field which is empty and due to this there is a Null pointer exception is being thrown.
Regards
Veeru
This message was posted using Email2Forum by Laurence.