On our production server, we are trying to migrate from OpenMRS 1.5 to OpenMRS 1.6. Testing this, we find that whenever we try to view a Data Export, the page is unable to load, and the log file contains the following stack trace:
ERROR - errorhandler_jsp._jspService(72) |2010-11-30 16:46:50,360| Error on page /openmrs/WEB-INF/view/module/reportingcompatibility/reports/dataExportForm.jsp
at sun.reflect.GeneratedMethodAccessor936.invoke(Unknown Source)
Looking into this, the issue is that the system is trying to load every Patient Filter report object (to display in the "saved searches" list, and some of these saved Patient Filters contain invalid XML. The reason they are invalid seems to be due to the person / user refactoring that went into 1.6 - the deserialization process is trying to call methods like "setFirstName", etc on User, and is unable to do so. There are a couple of issues here:
- The code does not sufficiently handle deserialization errors - throwing an uncaught NullPointerException, rather than catching this exception and continuing to load the report objects that it can load.
- The migration from 1.5 to 1.6 has not sufficiently provided backwards compatibility or migration utilities for these objects
- The Exception Handler for the deserialization process does not sufficiently log the errors that are happening.