terraframe / geoprism-registry

GeoPrism Registry is a system for curating interlinked data through time. It's the first framework implementing the Common Geo-Registry specification.
https://geoprismregistry.com/
GNU Lesser General Public License v3.0
18 stars 5 forks source link

NullPointerException when synchronizing Geo-Objects with DHIS2 #898

Closed rfromthecastle closed 1 year ago

rfromthecastle commented 1 year ago

List the CGR information

Describe the bug (clear and concise) A java.lang.NullPointerException appears when trying to synchronize district medical warehouses in the Laos GeoPrism Registry instance with DHIS2. This Geo-Object Type has a district as a parent, which in turn inherits the province and country (see HMIS Hierarchy: District Warehouses).

To Reproduce

  1. As a Registry Administrator, run the Dev HMIS - District Warehouses synchronization configuration.
  2. A java.lang.NullPointerException error appears.

Expected behavior (clear and concise) The synchronization works without error.

Screenshots image image image

Desktop (please complete the following information):

Additional context (if any) Similar synchronization configurations for the provincial and regional warehouses work fine.

rrowlands commented 1 year ago

Would like to also add to this ticket: if there are too many codes in the "Geo-Object code" column or the "Row number" column, the page does not display correctly. This fix is committed as 4620ec4848b6a12fcd83645d626503d59ffd0563.

rrowlands commented 1 year ago

This error is unfortunately happening because there exists (what I think is) corrupt data on your DHIS2 server. You can see an example of this data by placing the following url into your browser:

https://dhis2.asia/laohmis/api/metadata.json?organisationUnits=true&filter=id:eq:bPin6pwxahl

You will see that the returned organisation unit includes translation data which does not have a locale (see the description translation) image

I will modify our system such that it ignores this data and it should resolve your problem, however I am recommending that you might want to fix this corrupt data in your DHIS2 system.

Fix committed as 734927b15605ab9e7c3926f48a0a0879ae7c7972.

rfromthecastle commented 1 year ago

Thanks for investigating @rrowlands, I'll take this up with the IT team after Lao New Year

rfromthecastle commented 1 year ago

Having difficulty replicating the bug on Staging and re-testing, so will only be able to test and confirm the fix is working once deployed to the Laos instance.

rfromthecastle commented 1 year ago

Fix working on Laos instance.