DHIS 2 2.28 Migration to 2.30

I’ll appreciate your help if you have a time please.

We’re planning to migrate our DHIS 2 from 2.28 to 2.30. We started by doing a backup of the database and then set up a test environment where we first redeploy the 2.28 to make sure everything works as expected, then with dhis2-tools we tried to deploy the WAR of the 2.29 but when Tomcat tries to start, we have errors in the console that you will find in attachment. catalina.out (117.2 KB)

Note that we have as environment:

Ubuntu 16,

java version "1.8.0_201"

Java™ SE Runtime Environment (build 1.8.0_201-b09)

Java HotSpot™ 64-Bit Server VM (build 25.201-b09, mixed mode) ,

PostgreSQL 11.2, PostGis 2.5

1 Like

Hi,
Not sure, but from your logs there is the answer.

INFO 2019-03-22 08:38:36,097 ‘system-process’ update org.hisp.dhis.dataelement.DataElementCategory, name: default, uid: GLevLNI9wkl (AuditLogUtil.java [localhost-startStop-1])

  • ERROR 2019-03-22 08:38:36,338 java.lang.IllegalArgumentException: Unknown name value [AVERAGE_BOOL] for enum class [org.hisp.dhis.analytics.AggregationType]

As I have looked on the documentation https://docs.dhis2.org/2.30/en/developer/html/dhis2_developer_manual_full.html, you will find only the following aggregation types: SUM | AVERAGE | AVERAGE_SUM_ORG_UNIT | LAST | LAST_AVERAGE_ORG_UNIT | COUNT | STDDEV | VARIANCE | MIN | MAX

So I think you have to make a choice of the type you want to use for the specific dataelement.

Without knowing I think it would be something like

select * from dataelement where aggregationtype = ‘AVERAGE_BOOL’;

That query might return to you the specific data element with the wrong aggregation type. Then you probably would say:

update dataelement set aggregationtype = ‘AVERAGE’ where aggregationtype = ‘AVERAGE_BOOL’;

This is assuming of course that it is average you want as the aggregation type.

As error is appearing on the analytics side as well, I would probably drop all the analytics tables since they are autogenerated anyway. And then try to restart the server. You would need to run analytics again before you will be able to see report etc.

Anyhow, not sure - this is how I would probably start - could be something else

Good luck

3 Likes

Also looks like you need to enable the postgis extension on the database.

might need to run

echo ‘create extension postgis;’ | psql name_of_your_instance

I see you running postgres 11, usually it is adequate to use 10. have not installed postgis on 11.

see https://docs.dhis2.org/master/en/implementer/html/install_server_setup.html#install_postgresql_installation for some guidelines

3 Likes

Thank you @Ranga it’s working now

2 Likes

Hi,

Your postgresql (11.2) and postgis (2.5.1) is fine, I’ve used 11 for several weeks now with few problems - there are some issues with inheritance not being that efficient, but pg 10 would be worse (inheritance and table partitioning are relatively new pg features and change considerably from version to version).

Regards
Calle

3 Likes

A post was split to a new topic: I am having problems with the data entry modules where I can not select the health structures that are at the level 5 of the hierarchy