dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30573
Difficult to troubleshoot errors with custom form upgrade process
Hi,
I have seen lots of these error messages when starting up DHIS 2 databases:
* ERROR 2014-06-03 11:28:12,560 java.lang.NullPointerException
(ExpressionUpgrader.java [Thread-2])
* ERROR 2014-06-03 11:28:12,562 Upgrading custom data entry form failed:
Inpatient Department (ExpressionUpgrader.java [
Thread-2])
This is caused by the upgrade script as part of the startup routines for
updating custom forms from using internal IDs to use UIDs.
I assume the nullpointer either refers to either a dataelementid or a
categoryoptioncomboid that does no longer exist in the database, so the
upgrade process fails with a nullpointer.
The problem is that it since the id of the missing object is not in the log
it becomes hard to actually modify the custom form html to remove it, and
then to re-do the upgrade (restart DHIS).
The form is represented in the database as a big string with html code and
IDs all over the place, so it is no straightforward simple way to list
which DHIS IDs that are used in the form.
Unless anyone has a better idea for debugging this I suggest that we add a
little more information to the log, e.g.
"Upgrading custom data entry form failed: Inpatient Department.
dataelementid XXX does not exist"
Another improvement could be to actually ignore the missing objects and
continue with replacing IDs with UIDs for the rest of the form, since the
upgraded form will not be worse off than the old one.
And if possible still add information to the log as a warning that the
following IDs in the form are missing: dataelementid XXX etc."
Comments?
Ola
-------
----------------------------------
Ola Hodne Titlestad (Mr)
HISP
Department of Informatics
University of Oslo
Mobile: +47 48069736
Home address: Eftasåsen 68, 0687 Oslo, Norway. Googlemaps link
<https://maps.google.com/maps?q=Eftas%C3%A5sen+68,+0687+Oslo,+Norge&hl=en&ie=UTF8&sll=59.893855,10.785116&sspn=0.222842,0.585709&oq=eftas%C3%A5sen+68,+0687+Oslo,+&t=h&hnear=Eftas%C3%A5sen+68,+%C3%98stensj%C3%B8,+0687+Oslo,+Norway&z=16>
Follow ups