Hi Vunda,
From the log you extracted, it seems like you have a duplicate UID in your org unit. You can check this from sqlview to identify the org units and investigate how this happened.
ERROR 2017-11-16 13:33:15,502 Unexpected error occurred in scheduled task. (TaskUtils.java [taskScheduler-10])
org.springframework.dao.DuplicateKeyException: StatementCallback; SQL [create unique index in_orgunitstructure_organisationunituid_riWJM on _orgunitstructure_temp(organisationunituid)]; ERROR: could not create unique index “in_orgunitstructure_organisationunituid_riwjm”
Detail: Key (organisationunituid)=(AGZVRgGtsgm) is duplicated.; nested exception is org.postgresql.util.PSQLException: ERROR: could not create unique index “in_orgunitstructure_organisationunituid_riwjm”
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
Caused by: org.postgresql.util.PSQLException: ERROR: could not create unique index “in_orgunitstructure_organisationunituid_riwjm”
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455)
-
ERROR 2017-11-16 13:34:00,013 Unexpected error occurred in scheduled task. (TaskUtils.java [taskScheduler-9])
at com.sun.proxy.$Proxy76.sendSystemErrorNotification(Unknown Source)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
-
INFO 2017-11-16 18:04:00,569 [Level: ERROR, category: RESOURCETABLE_UPDATE, time: Thu Nov 16 18:04:00 WAT 2017, message: Process failed: StatementCallback; SQL [create unique index in_orgunitstructure_organisationunituid_ptMI8 on _orgunitstructure_temp(organisationunituid)]; ERROR: could not create unique index “in_orgunitstructure_organisationunituid_ptmi8”
Detail: Key (organisationunituid)=(AGZVRgGtsgm) is duplicated.; nested exception is org.postgresql.util.PSQLException: ERROR: could not create unique index “in_orgunitstructure_organisationunituid_ptmi8”
- ERROR 2017-11-16 18:04:01,388 Unexpected error occurred in scheduled task. (TaskUtils.java [taskScheduler-6])
org.springframework.dao.DuplicateKeyException: StatementCallback; SQL [create unique index in_orgunitstructure_organisationunituid_ptMI8 on _orgunitstructure_temp(organisationunituid)]; ERROR: could not create unique index “in_orgunitstructure_organisationunituid_ptmi8”
Detail: Key (organisationunituid)=(AGZVRgGtsgm) is duplicated.; nested exception is org.postgresql.util.PSQLException: ERROR: could not create unique index “in_orgunitstructure_organisationunituid_ptmi8”
Busoye Anifalaje (PhD)
Director of Services (Principal), BAO Systems
UK: +44 7901-740-757 | US: +1 682-307-0986|
busoye@baosystems.com | http://www.baosystems.com |
Skype: busoye | 2900 K Street, Suite 406, Washington D.C. 20007
**
···
On Wed, Nov 22, 2017 at 6:47 PM, Isaiah Nyabuto isaiahnyabuto@gmail.com wrote:
Hi Vunda,
I hope you were sorted out ?
You may also want to have look the following script on web APIs with dhis2 I once did. You only need to construct a URL and change the credentials and you are good to go.
Best regards
On Fri, Nov 17, 2017 at 3:57 PM, vunda limbe vundalon@gmail.com wrote:
Hi Everybody,
When I try to export meta data in both json or xml, I’m getting this message: "
{"httpStatus":"Internal Server Error","httpStatusCode":500,"status":"ERROR"}
Could someone tell me how to fix this? Alternativly, someone can give me a script in order to export dataelement, COC, CO and Dataset using Web Api.
Your help is welcome.
Thanks.
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
Isaiah Nyabuto
+254 729 572 616
Bsc. Health Records Management & Informatics, JKUAT.
–