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|
[email protected] <mailto:[email protected]> |
http://www.baosystems.com <http://www.baosystems.com/> |
Skype: busoye | 2900 K Street, Suite 406, Washington D.C. 20007
> On 1 Dec 2017, at 10:43, vunda limbe <[email protected]> wrote:
>
> Hi Isaiah,
>
> Thank you for your help, but I'm a newbie in Web API even in Restfull. I need
> step by step to apply the script you sent me.
> Could you help?
>
> Thanks.
>
> On Wed, Nov 22, 2017 at 6:47 PM, Isaiah Nyabuto <[email protected]
> <mailto:[email protected]>> wrote:
> Hi Vunda,
>
> I hope you were sorted out ?
>
> You may also want to have look the following script
> <https://github.com/INyabuto/dhis2_rapi> 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 <[email protected]
> <mailto:[email protected]>> 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
> <https://launchpad.net/~dhis2-users>
> Post to : [email protected]
> <mailto:[email protected]>
> Unsubscribe : https://launchpad.net/~dhis2-users
> <https://launchpad.net/~dhis2-users>
> More help : https://help.launchpad.net/ListHelp
> <https://help.launchpad.net/ListHelp>
>
>
>
>
> --
> --------------------------------------------------------------------------------
> Isaiah Nyabuto
> +254 729 572 616
> Bsc. Health Records Management & Informatics, JKUAT.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> <https://launchpad.net/~dhis2-devs>
> Post to : [email protected]
> <mailto:[email protected]>
> Unsubscribe : https://launchpad.net/~dhis2-devs
> <https://launchpad.net/~dhis2-devs>
> More help : https://help.launchpad.net/ListHelp
> <https://help.launchpad.net/ListHelp>
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : [email protected]
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp