Upgrades to 2.21

Hi All,

On a few upgrades to 2.21 I’ve run into a problem that only seems to show up occasionally.

I’ll receive and error along the lines of

java.lang.IllegalArgumentException: Unknown name value [Date] for enum class [org.hisp.dhis.common.ValueType]

Once you know what to look for it becomes pretty clear that if you run something like this

SELECT DISTINCT valuetype FROM dataelement;

You’ll find “Date” instead of “DATE” a similar thing happens with the feature type on the organisationunit table.

I haven’t been able to pin down exactly why it doesn’t always work but often on startup DHIS 2 will fix the problem on it’s own and I think change the names to the proper types other times I get the error above. My guess is that might be related to older versions of Postgres but that is just a hunch.

Can someone share some insight into what happens on startup and if there is a way I can help to write some integrity checks to run beforehand? Right now it’s pretty basic with queries like this:

SELECT uid, featuretype, name FROM organisationunit

WHERE featuretype NOT IN (‘NONE’, ‘MULTI_POLYGON’, ‘POLYGON’, ‘POINT’, ‘SYMBOL’);

I figured I’d try to get the whole picture before sending the user’s list.

Thanks,

Dan

Dan Cocos
Principal, BAO Systems

+1 202-352-2671 | dcocos@baosystems.com | http://www.baosystems.com | Skype: dancocos | 2900 K Street, Suite 404, Washington D.C. 20007

Did you check if there are any SQL views of any sort linked to the dataelement or organisationunit tables? That could prevent updates in case the column length must be changed.

Lars

···

On Wed, Dec 2, 2015 at 7:13 PM, Dan Cocos dan@dancocos.com wrote:

Hi All,

On a few upgrades to 2.21 I’ve run into a problem that only seems to show up occasionally.

I’ll receive and error along the lines of

java.lang.IllegalArgumentException: Unknown name value [Date] for enum class [org.hisp.dhis.common.ValueType]

Once you know what to look for it becomes pretty clear that if you run something like this

SELECT DISTINCT valuetype FROM dataelement;

You’ll find “Date” instead of “DATE” a similar thing happens with the feature type on the organisationunit table.

I haven’t been able to pin down exactly why it doesn’t always work but often on startup DHIS 2 will fix the problem on it’s own and I think change the names to the proper types other times I get the error above. My guess is that might be related to older versions of Postgres but that is just a hunch.

Can someone share some insight into what happens on startup and if there is a way I can help to write some integrity checks to run beforehand? Right now it’s pretty basic with queries like this:

SELECT uid, featuretype, name FROM organisationunit

WHERE featuretype NOT IN (‘NONE’, ‘MULTI_POLYGON’, ‘POLYGON’, ‘POINT’, ‘SYMBOL’);

I figured I’d try to get the whole picture before sending the user’s list.

Thanks,

Dan

Dan Cocos
Principal, BAO Systems

+1 202-352-2671 | dcocos@baosystems.com | http://www.baosystems.com | Skype: dancocos | 2900 K Street, Suite 404, Washington D.C. 20007


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

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org