Error when exporting metadata throuhg metadata export

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.

Hello Vunda,

Whenever you get a 500 Internal Server Error, you have too look at (and probrobably share) your Tomcat server log, which should contain more interesting error messages.

Regards,

Knut

···

On Fri, Nov 17, 2017 at 1: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

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Hi Knut,

Attached the logs.

Thanks.

catalina.2017-11-17.log (4.41 KB)

localhost.2017-11-17.log (1.21 KB)

···

On Fri, Nov 17, 2017 at 2:37 PM, Knut Staring knutst@gmail.com wrote:

Hello Vunda,

Whenever you get a 500 Internal Server Error, you have too look at (and probrobably share) your Tomcat server log, which should contain more interesting error messages.

Regards,

Knut

On Fri, Nov 17, 2017 at 1: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

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

in your logs there’s only the OK saying DHIS2 started. Try to get the log at the time of the error (tail -f while reproducing the error)

···

2017-11-21 10:37 GMT+01:00 vunda limbe vundalon@gmail.com:

Hi Knut,

Attached the logs.

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

On Fri, Nov 17, 2017 at 2:37 PM, Knut Staring knutst@gmail.com wrote:

Hello Vunda,

Whenever you get a 500 Internal Server Error, you have too look at (and probrobably share) your Tomcat server log, which should contain more interesting error messages.

Regards,

Knut

On Fri, Nov 17, 2017 at 1: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

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Hi ramon,

I only find this in my tomcat folder

localhost_access_log.2017-11-21.txt (29.4 KB)

···

On Tue, Nov 21, 2017 at 11:47 AM, Ramón José Jiménez Pomareta dhis2@pomareta.ch wrote:

in your logs there’s only the OK saying DHIS2 started. Try to get the log at the time of the error (tail -f while reproducing the error)

2017-11-21 10:37 GMT+01:00 vunda limbe vundalon@gmail.com:

Hi Knut,

Attached the logs.

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

On Fri, Nov 17, 2017 at 2:37 PM, Knut Staring knutst@gmail.com wrote:

Hello Vunda,

Whenever you get a 500 Internal Server Error, you have too look at (and probrobably share) your Tomcat server log, which should contain more interesting error messages.

Regards,

Knut

On Fri, Nov 17, 2017 at 1: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

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Hi Vunda,

Look for a file called catalina.out, probably in your logs folder under Tomcat.

Knut

···

On Tue, Nov 21, 2017 at 5:25 PM, vunda limbe vundalon@gmail.com wrote:

Hi ramon,

I only find this in my tomcat folder

On Tue, Nov 21, 2017 at 11:47 AM, Ramón José Jiménez Pomareta dhis2@pomareta.ch wrote:

in your logs there’s only the OK saying DHIS2 started. Try to get the log at the time of the error (tail -f while reproducing the error)

2017-11-21 10:37 GMT+01:00 vunda limbe vundalon@gmail.com:

Hi Knut,

Attached the logs.

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

On Fri, Nov 17, 2017 at 2:37 PM, Knut Staring knutst@gmail.com wrote:

Hello Vunda,

Whenever you get a 500 Internal Server Error, you have too look at (and probrobably share) your Tomcat server log, which should contain more interesting error messages.

Regards,

Knut

On Fri, Nov 17, 2017 at 1: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

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Knut Staring

Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683
Mobile 1: +33 6 4434 2931
Mobile 2: +47 9188 0522
Skype: knutstar

Depending on the version of Tomcat it doesn’t always log everything to catalina.out

$DHIS_HOME by default /opt/dhis2/ then look in /opt/dhis2/logs/dhis.log and you should be able to find some clues.

Good luck.

Dan Cocos
Principal, BAO Systems
dcocos@baosystems.com | http://www.baosystems.com | 2900 K Street, Suite 406, Washington D.C. 20007

···

On Tue, Nov 21, 2017 at 5:25 PM, vunda limbe vundalon@gmail.com wrote:

Hi ramon,

I only find this in my tomcat folder

On Tue, Nov 21, 2017 at 11:47 AM, Ramón José Jiménez Pomareta dhis2@pomareta.ch wrote:

in your logs there’s only the OK saying DHIS2 started. Try to get the log at the time of the error (tail -f while reproducing the error)

2017-11-21 10:37 GMT+01:00 vunda limbe vundalon@gmail.com:

Hi Knut,

Attached the logs.

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

On Fri, Nov 17, 2017 at 2:37 PM, Knut Staring knutst@gmail.com wrote:

Hello Vunda,

Whenever you get a 500 Internal Server Error, you have too look at (and probrobably share) your Tomcat server log, which should contain more interesting error messages.

Regards,

Knut

On Fri, Nov 17, 2017 at 1: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

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Knut Staring

Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683
Mobile 1: +33 6 4434 2931
Mobile 2: +47 9188 0522
Skype: knutstar

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.

Hi Dan and Every body,

Sorry for taking much time for answer. Here is the new one as suggested by Dan.

Thanks.

dhis.log (1.31 MB)

···

On Tue, Nov 21, 2017 at 3:50 PM, Dan Cocos dan@dancocos.com wrote:

Depending on the version of Tomcat it doesn’t always log everything to catalina.out
$DHIS_HOME by default /opt/dhis2/ then look in /opt/dhis2/logs/dhis.log and you should be able to find some clues.

Good luck.

Dan Cocos
Principal, BAO Systems
dcocos@baosystems.com | http://www.baosystems.com | 2900 K Street, Suite 406, Washington D.C. 20007

On Nov 21, 2017, at 9:46 AM, Knut Staring knutst@gmail.com wrote:

Hi Vunda,

Look for a file called catalina.out, probably in your logs folder under Tomcat.

Knut


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

Hi ramon,

I only find this in my tomcat folder

On Tue, Nov 21, 2017 at 5:25 PM, vunda limbe vundalon@gmail.com wrote:


Knut Staring

Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683
Mobile 1: +33 6 4434 2931
Mobile 2: +47 9188 0522
Skype: knutstar

in your logs there’s only the OK saying DHIS2 started. Try to get the log at the time of the error (tail -f while reproducing the error)

On Tue, Nov 21, 2017 at 11:47 AM, Ramón José Jiménez Pomareta dhis2@pomareta.ch wrote:

2017-11-21 10:37 GMT+01:00 vunda limbe vundalon@gmail.com:

Hi Knut,

Attached the logs.

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

Hello Vunda,

Whenever you get a 500 Internal Server Error, you have too look at (and probrobably share) your Tomcat server log, which should contain more interesting error messages.

Regards,

Knut

On Fri, Nov 17, 2017 at 2:37 PM, Knut Staring knutst@gmail.com wrote:

On Fri, Nov 17, 2017 at 1: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

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

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 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.

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.

Hi Vunda,

Yes, I am very happy to assist where I can, and to see you learn in the community.

If you still stack, let me know, we can plan for a Skype sessions.

Best regards

···

On Fri, Dec 1, 2017 at 1:43 PM, vunda limbe vundalon@gmail.com 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 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.


Isaiah Nyabuto
+254 729 572 616

Bsc. Health Records Management & Informatics, JKUAT.