2

I downloaded the dhis2-db-sierra-leone.sql db and imported it into PostreSQL 9.4 running on Windows 8.1. I have configured the dhis.conf as:

#hibernate.dialect = org.hibernate.dialect.H2Dialect
#hibernate.connection.driver_class = org.h2.Driver
#hibernate.connection.url = jdbc:h2:./database/dhis2;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE
#hibernate.connection.username = sa
#hibernate.connection.password =

hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
hibernate.connection.driver_class = org.postgresql.Driver
hibernate.connection.url = jdbc:postgresql:dhis2
hibernate.connection.username = dhis
hibernate.connection.password = dhis

hibernate.hbm2ddl.auto = update

When I run the start I get 503 error:

HTTP ERROR: 503
Problem accessing /. Reason:
    Service Unavailable
Powered by Jetty://

In the log file, I'm getting this:

* INFO  2016-12-22 15:27:01,449 'system-process' update org.hisp.dhis.dataelement.DataElementCategory, name: default, uid: vGs6omsRekv (AuditLogUtil.java [Thread-2])
* ERROR 2016-12-22 15:27:01,544 java.lang.IllegalArgumentException: Unknown name value [ORGANISATION_UNIT] for enum class [org.hisp.dhis.common.ValueType]
    at org.hibernate.type.EnumType$NamedEnumValueMapper.fromName(EnumType.java:433)

Any ideas?

1 Answer 1

1

You have an invalid value in the "dataelement" and/or "trackedentityattribute" tables for the valuetype column. The valid values are these:

TEXT LONG_TEXT, LETTER, PHONE_NUMBER, EMAIL, BOOLEAN, TRUE_ONLY, DATE, DATETIME, TIME, NUMBER, UNIT_INTERVAL, PERCENTAGE, INTEGER, INTEGER_POSITIVE, INTEGER_NEGATIVE, INTEGER_ZERO_OR_POSITIVE, TRACKER_ASSOCIATE, USERNAME, FILE_RESOURCE, COORDINATE, ORGANISATION_UNIT, AGE

Replace all values which are not among these.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.