Exception due to blank Date Field in DB

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.

Hi Veeru,

Thanks for pointing it out.

Yes, we found the issue after the initial test (implementing your scenario), we will fix it soon.

Thank you.

Hi Veeru,
Thank you for considering Aspose.
We have fixed one possible bug that can cause such Exception for null Date. Please try the attached latest fix and let us know if it works fine.
Thank You & Best Regards,

The issues you have found earlier (filed as CELLSJAVA-8760) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.