Problem upgrading from 2.20 to 2.21

Hi

After upgrading from 2.20 to 2.21 system is failing to start with:

ERROR 2016-07-22 09:01:36,593 java.lang.IllegalArgumentException:
Unknown name value [avg_sum_org_unit] for enum class
[org.hisp.dhis.analytics.AggregationType]

This looks like one of those new enum upper case restrictions. Does
anyone have a quick recipe to solve?

Bob

Unfortunately, I do not have a query that will quickly uppercase that column, but here is the mapping I used when doing my 2.20 → 2.21 though:

sum
SUM
average
AVERAGE_SUM_ORG_UNIT
avg
AVERAGE
count
COUNT
stddev
STDDEV
variance
VARIANCE
min
MIN
max
MAX
I’m surprised that somehow “average” was updated to “average_sum_org_unit” but wasn’t also converted to uppercase at the same time.

image

···

On Fri, Jul 22, 2016 at 9:09 AM, Bob Jolliffe bobjolliffe@gmail.com wrote:

Hi

After upgrading from 2.20 to 2.21 system is failing to start with:

ERROR 2016-07-22 09:01:36,593 java.lang.IllegalArgumentException:

Unknown name value [avg_sum_org_unit] for enum class

[org.hisp.dhis.analytics.AggregationType]

This looks like one of those new enum upper case restrictions. Does

anyone have a quick recipe to solve?

Bob


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Timothy Harding
Sr. Systems Analyst, BAO Systems

+1 202-536-1541 | tharding@baosystems.com | http://www.baosystems.com | Skype: hardingt@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007

Hi Bob,

Can you update the dataelement table on postgres by running an update query and setting the aggregationtype to ‘SUM’ where it is ‘sum’?

UPDATE dataelement set aggregationtype = ‘SUM’ where aggregationtype = ‘sum’;

Regards,

Michael

···

On 22 July 2016 at 09:09, Bob Jolliffe bobjolliffe@gmail.com wrote:

Hi

After upgrading from 2.20 to 2.21 system is failing to start with:

ERROR 2016-07-22 09:01:36,593 java.lang.IllegalArgumentException:

Unknown name value [avg_sum_org_unit] for enum class

[org.hisp.dhis.analytics.AggregationType]

This looks like one of those new enum upper case restrictions. Does

anyone have a quick recipe to solve?

Bob


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Thanks all. The startup routines should take care of all this stuff
without the need for running manual queries. And indeed they do
unless they fail - which as Dan says they do horribly when they do,

I have deleted the offending views and everything started up fine.

···

On 22 July 2016 at 14:33, Michael Mwebaze <michael.mwebaze@gmail.com> wrote:

Hi Bob,

Can you update the dataelement table on postgres by running an update query
and setting the aggregationtype to 'SUM' where it is 'sum'?

UPDATE dataelement set aggregationtype = 'SUM' where aggregationtype =
'sum';

Regards,

Michael

On 22 July 2016 at 09:09, Bob Jolliffe <bobjolliffe@gmail.com> wrote:

Hi

After upgrading from 2.20 to 2.21 system is failing to start with:

ERROR 2016-07-22 09:01:36,593 java.lang.IllegalArgumentException:
Unknown name value [avg_sum_org_unit] for enum class
[org.hisp.dhis.analytics.AggregationType]

This looks like one of those new enum upper case restrictions. Does
anyone have a quick recipe to solve?

Bob

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp

Yes that does help. And the upgrade notes tell you to do this.
Unfortunately when users create views directly through the database
rather than through the application they need to be tracked down and
removed.

Fortunately all these were prefixed with _view so I could grab them
all with 'pg_dump -s -t '_view*' dhis2 >views.sql' before dropping
them.

···

On 22 July 2016 at 14:40, Dan Cocos <dcocos@gmail.com> wrote:

One thing that seems to help is if you drop all of the SQL Views from DHIS 2 first, if they have a relation to the tables they don't get updated.

On Jul 22, 2016, at 9:37 AM, Bob Jolliffe <bobjolliffe@gmail.com> wrote:

Thanks all. The startup routines should take care of all this stuff
without the need for running manual queries. And indeed they do
unless they fail - which as Dan says they do horribly when they do,

I have deleted the offending views and everything started up fine.

On 22 July 2016 at 14:33, Michael Mwebaze <michael.mwebaze@gmail.com> wrote:

Hi Bob,

Can you update the dataelement table on postgres by running an update query
and setting the aggregationtype to 'SUM' where it is 'sum'?

UPDATE dataelement set aggregationtype = 'SUM' where aggregationtype =
'sum';

Regards,

Michael

On 22 July 2016 at 09:09, Bob Jolliffe <bobjolliffe@gmail.com> wrote:

Hi

After upgrading from 2.20 to 2.21 system is failing to start with:

ERROR 2016-07-22 09:01:36,593 java.lang.IllegalArgumentException:
Unknown name value [avg_sum_org_unit] for enum class
[org.hisp.dhis.analytics.AggregationType]

This looks like one of those new enum upper case restrictions. Does
anyone have a quick recipe to solve?

Bob

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp