Event Data Import not working properly?

Dear all,

From PSI, we need to automatically introduce into DHIS2 thousands of single events without registration, so we would like to use the Event Data Import service of DHIS2. However, it seems that that funcionality was not really working as nothing was happening in the system, although I did not receive any error message in the Catalina.out:

INFO 2014-01-20 21:42:22,909 [Level: INFO, category: EVENT_IMPORT, time: Mon Jan 20 21:42:22 UTC 2014, message: Importing events] (InMemoryNotifier.java [taskScheduler-8])

I tried to replicate the same problem in the Sierra Leone Demo instance, so first at all I used the Event Data Export to get one xml example of the program “Inpatient Morbidity and Mortality” under the OrgUnit “Njandama MCHP”, I edited the xml file and when I tried to import it, again, nothing happened. Please find attached in this email a copy of that file (named as events.xml), as maybe I am missing something…

However, when if I use the curl utility to call the API:( curl -d @events.xmlhttp://apps.dhis2.org/demo/api/events” -H “Content-Type:application/xml” -u admin:district -v ) the event is correctly stored in the database.

BUT, if we have several events in the same file, as in the attached file eventsList.xml, it seems that the API only is storing the last event.

Any ideas?

We are using the 2.13 version till the end of March, so it would be nice if you could look for a solution in the 2.13 version as well :).

Many thanks

Jose

events.xml (600 Bytes)

eventsList.xml (2.6 KB)

Hi,

I have fixed this issue now, the problem was that it defaulted to JSON format… and there was no way to change it. Now the UI allows you to select the format (default XML), and do the import. I tested it with 10 events now, and it was working fine.

Could you try it again? I will backport to 2.13, 2.14, and our download server should be updated in a couple of hours.

I had no problem when I used cURL though…

···


Morten

On Tue, Jan 21, 2014 at 7:30 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Dear all,

From PSI, we need to automatically introduce into DHIS2 thousands of single events without registration, so we would like to use the Event Data Import service of DHIS2. However, it seems that that funcionality was not really working as nothing was happening in the system, although I did not receive any error message in the Catalina.out:

INFO 2014-01-20 21:42:22,909 [Level: INFO, category: EVENT_IMPORT, time: Mon Jan 20 21:42:22 UTC 2014, message: Importing events] (InMemoryNotifier.java [taskScheduler-8])

I tried to replicate the same problem in the Sierra Leone Demo instance, so first at all I used the Event Data Export to get one xml example of the program “Inpatient Morbidity and Mortality” under the OrgUnit “Njandama MCHP”, I edited the xml file and when I tried to import it, again, nothing happened. Please find attached in this email a copy of that file (named as events.xml), as maybe I am missing something…

However, when if I use the curl utility to call the API:( curl -d @events.xmlhttp://apps.dhis2.org/demo/api/events” -H “Content-Type:application/xml” -u admin:district -v ) the event is correctly stored in the database.

BUT, if we have several events in the same file, as in the attached file eventsList.xml, it seems that the API only is storing the last event.

Any ideas?

We are using the 2.13 version till the end of March, so it would be nice if you could look for a solution in the 2.13 version as well :).

Many thanks

Jose


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

Hi Morten,

Still, it is not working. I have tried with the demo version and with the war file (2.13 version) that I downloaded at 19:30 Oslo time (Wednesday).

Yep, with cURL you are not going to get any error, but if you send a list of events the system is only going to store the last one. You can do the test with the file previously attached (eventsList.xml) that shoud introduce 5 events in the OrgUnit “Njandama MCHP”.

Many thanks for your time

Jose

···

On Wed, Jan 22, 2014 at 10:29 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

I have fixed this issue now, the problem was that it defaulted to JSON format… and there was no way to change it. Now the UI allows you to select the format (default XML), and do the import. I tested it with 10 events now, and it was working fine.

Could you try it again? I will backport to 2.13, 2.14, and our download server should be updated in a couple of hours.

I had no problem when I used cURL though…


Morten

On Tue, Jan 21, 2014 at 7:30 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Dear all,

From PSI, we need to automatically introduce into DHIS2 thousands of single events without registration, so we would like to use the Event Data Import service of DHIS2. However, it seems that that funcionality was not really working as nothing was happening in the system, although I did not receive any error message in the Catalina.out:

INFO 2014-01-20 21:42:22,909 [Level: INFO, category: EVENT_IMPORT, time: Mon Jan 20 21:42:22 UTC 2014, message: Importing events] (InMemoryNotifier.java [taskScheduler-8])

I tried to replicate the same problem in the Sierra Leone Demo instance, so first at all I used the Event Data Export to get one xml example of the program “Inpatient Morbidity and Mortality” under the OrgUnit “Njandama MCHP”, I edited the xml file and when I tried to import it, again, nothing happened. Please find attached in this email a copy of that file (named as events.xml), as maybe I am missing something…

However, when if I use the curl utility to call the API:( curl -d @events.xmlhttp://apps.dhis2.org/demo/api/events” -H “Content-Type:application/xml” -u admin:district -v ) the event is correctly stored in the database.

BUT, if we have several events in the same file, as in the attached file eventsList.xml, it seems that the API only is storing the last event.

Any ideas?

We are using the 2.13 version till the end of March, so it would be nice if you could look for a solution in the 2.13 version as well :).

Many thanks

Jose


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

Hi,

Please give our servers a bit of time to compile… then download and try again. It should work now.

···


Morten

On Thu, Jan 23, 2014 at 1:38 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

Still, it is not working. I have tried with the demo version and with the war file (2.13 version) that I downloaded at 19:30 Oslo time (Wednesday).

Yep, with cURL you are not going to get any error, but if you send a list of events the system is only going to store the last one. You can do the test with the file previously attached (eventsList.xml) that shoud introduce 5 events in the OrgUnit “Njandama MCHP”.

Many thanks for your time

Jose

On Wed, Jan 22, 2014 at 10:29 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

I have fixed this issue now, the problem was that it defaulted to JSON format… and there was no way to change it. Now the UI allows you to select the format (default XML), and do the import. I tested it with 10 events now, and it was working fine.

Could you try it again? I will backport to 2.13, 2.14, and our download server should be updated in a couple of hours.

I had no problem when I used cURL though…


Morten

On Tue, Jan 21, 2014 at 7:30 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Dear all,

From PSI, we need to automatically introduce into DHIS2 thousands of single events without registration, so we would like to use the Event Data Import service of DHIS2. However, it seems that that funcionality was not really working as nothing was happening in the system, although I did not receive any error message in the Catalina.out:

INFO 2014-01-20 21:42:22,909 [Level: INFO, category: EVENT_IMPORT, time: Mon Jan 20 21:42:22 UTC 2014, message: Importing events] (InMemoryNotifier.java [taskScheduler-8])

I tried to replicate the same problem in the Sierra Leone Demo instance, so first at all I used the Event Data Export to get one xml example of the program “Inpatient Morbidity and Mortality” under the OrgUnit “Njandama MCHP”, I edited the xml file and when I tried to import it, again, nothing happened. Please find attached in this email a copy of that file (named as events.xml), as maybe I am missing something…

However, when if I use the curl utility to call the API:( curl -d @events.xmlhttp://apps.dhis2.org/demo/api/events” -H “Content-Type:application/xml” -u admin:district -v ) the event is correctly stored in the database.

BUT, if we have several events in the same file, as in the attached file eventsList.xml, it seems that the API only is storing the last event.

Any ideas?

We are using the 2.13 version till the end of March, so it would be nice if you could look for a solution in the 2.13 version as well :).

Many thanks

Jose


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

Hi Morten,

I downloaded the 2.13 war version this Saturday at 13.30 (Oslo time). Unfortunately I´ve got the same results than before. I have also tested the demo with same results as well.

···

On Fri, Jan 24, 2014 at 5:48 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

Please give our servers a bit of time to compile… then download and try again. It should work now.


Morten

On Thu, Jan 23, 2014 at 1:38 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

Still, it is not working. I have tried with the demo version and with the war file (2.13 version) that I downloaded at 19:30 Oslo time (Wednesday).

Yep, with cURL you are not going to get any error, but if you send a list of events the system is only going to store the last one. You can do the test with the file previously attached (eventsList.xml) that shoud introduce 5 events in the OrgUnit “Njandama MCHP”.

Many thanks for your time

Jose

On Wed, Jan 22, 2014 at 10:29 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

I have fixed this issue now, the problem was that it defaulted to JSON format… and there was no way to change it. Now the UI allows you to select the format (default XML), and do the import. I tested it with 10 events now, and it was working fine.

Could you try it again? I will backport to 2.13, 2.14, and our download server should be updated in a couple of hours.

I had no problem when I used cURL though…


Morten

On Tue, Jan 21, 2014 at 7:30 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Dear all,

From PSI, we need to automatically introduce into DHIS2 thousands of single events without registration, so we would like to use the Event Data Import service of DHIS2. However, it seems that that funcionality was not really working as nothing was happening in the system, although I did not receive any error message in the Catalina.out:

INFO 2014-01-20 21:42:22,909 [Level: INFO, category: EVENT_IMPORT, time: Mon Jan 20 21:42:22 UTC 2014, message: Importing events] (InMemoryNotifier.java [taskScheduler-8])

I tried to replicate the same problem in the Sierra Leone Demo instance, so first at all I used the Event Data Export to get one xml example of the program “Inpatient Morbidity and Mortality” under the OrgUnit “Njandama MCHP”, I edited the xml file and when I tried to import it, again, nothing happened. Please find attached in this email a copy of that file (named as events.xml), as maybe I am missing something…

However, when if I use the curl utility to call the API:( curl -d @events.xmlhttp://apps.dhis2.org/demo/api/events” -H “Content-Type:application/xml” -u admin:district -v ) the event is correctly stored in the database.

BUT, if we have several events in the same file, as in the attached file eventsList.xml, it seems that the API only is storing the last event.

Any ideas?

We are using the 2.13 version till the end of March, so it would be nice if you could look for a solution in the 2.13 version as well :).

Many thanks

Jose


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

Which revision?

···

On Fri, Jan 24, 2014 at 5:48 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

Please give our servers a bit of time to compile… then download and try again. It should work now.


Morten

On Thu, Jan 23, 2014 at 1:38 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

Still, it is not working. I have tried with the demo version and with the war file (2.13 version) that I downloaded at 19:30 Oslo time (Wednesday).

Yep, with cURL you are not going to get any error, but if you send a list of events the system is only going to store the last one. You can do the test with the file previously attached (eventsList.xml) that shoud introduce 5 events in the OrgUnit “Njandama MCHP”.

Many thanks for your time

Jose

On Wed, Jan 22, 2014 at 10:29 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

I have fixed this issue now, the problem was that it defaulted to JSON format… and there was no way to change it. Now the UI allows you to select the format (default XML), and do the import. I tested it with 10 events now, and it was working fine.

Could you try it again? I will backport to 2.13, 2.14, and our download server should be updated in a couple of hours.

I had no problem when I used cURL though…


Morten

On Tue, Jan 21, 2014 at 7:30 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Dear all,

From PSI, we need to automatically introduce into DHIS2 thousands of single events without registration, so we would like to use the Event Data Import service of DHIS2. However, it seems that that funcionality was not really working as nothing was happening in the system, although I did not receive any error message in the Catalina.out:

INFO 2014-01-20 21:42:22,909 [Level: INFO, category: EVENT_IMPORT, time: Mon Jan 20 21:42:22 UTC 2014, message: Importing events] (InMemoryNotifier.java [taskScheduler-8])

I tried to replicate the same problem in the Sierra Leone Demo instance, so first at all I used the Event Data Export to get one xml example of the program “Inpatient Morbidity and Mortality” under the OrgUnit “Njandama MCHP”, I edited the xml file and when I tried to import it, again, nothing happened. Please find attached in this email a copy of that file (named as events.xml), as maybe I am missing something…

However, when if I use the curl utility to call the API:( curl -d @events.xmlhttp://apps.dhis2.org/demo/api/events” -H “Content-Type:application/xml” -u admin:district -v ) the event is correctly stored in the database.

BUT, if we have several events in the same file, as in the attached file eventsList.xml, it seems that the API only is storing the last event.

Any ideas?

We are using the 2.13 version till the end of March, so it would be nice if you could look for a solution in the 2.13 version as well :).

Many thanks

Jose


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

Hi Morten, I have just donwloaded the war file again. The revision is 12947. And the date 2014-01-20 21:20

So maybe the war file I am downloading is not updated yet?

···

On Sun, Jan 26, 2014 at 4:59 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Which revision?

On Jan 26, 2014 2:46 AM, “Jose Garcia Muñoz” josemp10@gmail.com wrote:

Hi Morten,

I downloaded the 2.13 war version this Saturday at 13.30 (Oslo time). Unfortunately I´ve got the same results than before. I have also tested the demo with same results as well.

On Fri, Jan 24, 2014 at 5:48 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

Please give our servers a bit of time to compile… then download and try again. It should work now.


Morten

On Thu, Jan 23, 2014 at 1:38 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

Still, it is not working. I have tried with the demo version and with the war file (2.13 version) that I downloaded at 19:30 Oslo time (Wednesday).

Yep, with cURL you are not going to get any error, but if you send a list of events the system is only going to store the last one. You can do the test with the file previously attached (eventsList.xml) that shoud introduce 5 events in the OrgUnit “Njandama MCHP”.

Many thanks for your time

Jose

On Wed, Jan 22, 2014 at 10:29 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

I have fixed this issue now, the problem was that it defaulted to JSON format… and there was no way to change it. Now the UI allows you to select the format (default XML), and do the import. I tested it with 10 events now, and it was working fine.

Could you try it again? I will backport to 2.13, 2.14, and our download server should be updated in a couple of hours.

I had no problem when I used cURL though…


Morten

On Tue, Jan 21, 2014 at 7:30 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Dear all,

From PSI, we need to automatically introduce into DHIS2 thousands of single events without registration, so we would like to use the Event Data Import service of DHIS2. However, it seems that that funcionality was not really working as nothing was happening in the system, although I did not receive any error message in the Catalina.out:

INFO 2014-01-20 21:42:22,909 [Level: INFO, category: EVENT_IMPORT, time: Mon Jan 20 21:42:22 UTC 2014, message: Importing events] (InMemoryNotifier.java [taskScheduler-8])

I tried to replicate the same problem in the Sierra Leone Demo instance, so first at all I used the Event Data Export to get one xml example of the program “Inpatient Morbidity and Mortality” under the OrgUnit “Njandama MCHP”, I edited the xml file and when I tried to import it, again, nothing happened. Please find attached in this email a copy of that file (named as events.xml), as maybe I am missing something…

However, when if I use the curl utility to call the API:( curl -d @events.xmlhttp://apps.dhis2.org/demo/api/events” -H “Content-Type:application/xml” -u admin:district -v ) the event is correctly stored in the database.

BUT, if we have several events in the same file, as in the attached file eventsList.xml, it seems that the API only is storing the last event.

Any ideas?

We are using the 2.13 version till the end of March, so it would be nice if you could look for a solution in the 2.13 version as well :).

Many thanks

Jose


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

That seems very old… can you try this direct link:
http://apps.dhis2.org/ci/job/dhis-2.13/lastSuccessfulBuild/artifact/dhis-2/dhis-web/dhis-web-portal/target/dhis.war

This was built today

···


Morten

On Sun, Jan 26, 2014 at 5:48 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten, I have just donwloaded the war file again. The revision is 12947. And the date 2014-01-20 21:20

So maybe the war file I am downloading is not updated yet?

On Sun, Jan 26, 2014 at 4:59 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Which revision?

On Jan 26, 2014 2:46 AM, “Jose Garcia Muñoz” josemp10@gmail.com wrote:

Hi Morten,

I downloaded the 2.13 war version this Saturday at 13.30 (Oslo time). Unfortunately I´ve got the same results than before. I have also tested the demo with same results as well.

On Fri, Jan 24, 2014 at 5:48 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

Please give our servers a bit of time to compile… then download and try again. It should work now.


Morten

On Thu, Jan 23, 2014 at 1:38 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

Still, it is not working. I have tried with the demo version and with the war file (2.13 version) that I downloaded at 19:30 Oslo time (Wednesday).

Yep, with cURL you are not going to get any error, but if you send a list of events the system is only going to store the last one. You can do the test with the file previously attached (eventsList.xml) that shoud introduce 5 events in the OrgUnit “Njandama MCHP”.

Many thanks for your time

Jose

On Wed, Jan 22, 2014 at 10:29 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

I have fixed this issue now, the problem was that it defaulted to JSON format… and there was no way to change it. Now the UI allows you to select the format (default XML), and do the import. I tested it with 10 events now, and it was working fine.

Could you try it again? I will backport to 2.13, 2.14, and our download server should be updated in a couple of hours.

I had no problem when I used cURL though…


Morten

On Tue, Jan 21, 2014 at 7:30 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Dear all,

From PSI, we need to automatically introduce into DHIS2 thousands of single events without registration, so we would like to use the Event Data Import service of DHIS2. However, it seems that that funcionality was not really working as nothing was happening in the system, although I did not receive any error message in the Catalina.out:

INFO 2014-01-20 21:42:22,909 [Level: INFO, category: EVENT_IMPORT, time: Mon Jan 20 21:42:22 UTC 2014, message: Importing events] (InMemoryNotifier.java [taskScheduler-8])

I tried to replicate the same problem in the Sierra Leone Demo instance, so first at all I used the Event Data Export to get one xml example of the program “Inpatient Morbidity and Mortality” under the OrgUnit “Njandama MCHP”, I edited the xml file and when I tried to import it, again, nothing happened. Please find attached in this email a copy of that file (named as events.xml), as maybe I am missing something…

However, when if I use the curl utility to call the API:( curl -d @events.xmlhttp://apps.dhis2.org/demo/api/events” -H “Content-Type:application/xml” -u admin:district -v ) the event is correctly stored in the database.

BUT, if we have several events in the same file, as in the attached file eventsList.xml, it seems that the API only is storing the last event.

Any ideas?

We are using the 2.13 version till the end of March, so it would be nice if you could look for a solution in the 2.13 version as well :).

Many thanks

Jose


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

Hi Morten,

I am using the 12953 revision now.

Still getting errors when I try to import SEwoR (it does not matter if am using the uid or the code). The tomcat writes the following error:

There are some Spanish sentences (sorry). The first one said: “The insertion in the table patiendatavalue violates the foreign key fk_patientdatavalue_programstageinstance”

The second one: “The key (programstageinstanceid)=(0) is not presented in the table programstageinstane”.

Any ideas?

  • INFO 2014-01-26 19:13:41,695 ‘josemp10’ update org.hisp.dhis.program.ProgramS

tageInstance, uid: ZBQZwXnO2xN (AuditLogUtil.java [taskScheduler-1])

  • INFO 2014-01-26 19:13:41,909 ‘josemp10’ create org.hisp.dhis.program.ProgramS

tageInstance, uid: ZBQZwXnO2xN (AuditLogUtil.java [taskScheduler-1])

  • WARN 2014-01-26 19:13:43,495 SQL Error: 0, SQLState: 23503 (SqlExceptionHelpe

r.java [taskScheduler-1])

  • ERROR 2014-01-26 19:13:43,496 ERROR: inserci¾n o actualizaci¾n en la tabla ½pa

tientdatavalue╗ viola la llave forßnea ½fk_patientdatavalue_programstageinstance

id╗

Detail: La llave (programstageinstanceid)=(0) no estß presente en la tabla ½pr

ogramstageinstance╗. (SqlExceptionHelper.java [taskScheduler-1])

  • ERROR 2014-01-26 19:13:43,570 Application exception overridden by commit excep

tion (TransactionAspectSupport.java [taskScheduler-1])

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized f

ield “eventList” (class org.hisp.dhis.dxf2.events.event.Event), not marked as ig

norable (11 known properties: , “program”, “orgUnit”, “eventDate”, “href”, "data

Values", “status”, “person”, “coordinate”, “event”, “storedBy”, “programStage”])

at [Source: java.io.StringReader@7f3e53d5; line: 4, column: 144] (through refer

ence chain: org.hisp.dhis.dxf2.events.event.Event[“eventList”])

at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from

(UnrecognizedPropertyException.java:79)

at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownPr

operty(DeserializationContext.java:568)

at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknow

nProperty(StdDeserializer.java:650)

at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnkno

wnProperty(BeanDeserializerBase.java:830)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFrom

Object(BeanDeserializer.java:310)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(Bea

nDeserializer.java:112)

at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMa

pper.java:2580)

at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.ja

va:1810)

at org.hisp.dhis.dxf2.events.event.JacksonEventService.fromXml(JacksonEv

entService.java:76)

at org.hisp.dhis.dxf2.events.event.JacksonEventService.saveEventsXml(Jac

ksonEventService.java:133)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti

on(AopUtils.java:317)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo

inpoint(ReflectiveMethodInvocation.java:183)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:150)

at org.springframework.transaction.interceptor.TransactionInterceptor$1.

proceedWithInvocation(TransactionInterceptor.java:96)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

invokeWithinTransaction(TransactionAspectSupport.java:260)

at org.springframework.transaction.interceptor.TransactionInterceptor.in

voke(TransactionInterceptor.java:94)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:172)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami

cAopProxy.java:204)

at com.sun.proxy.$Proxy105.saveEventsXml(Unknown Source)

at org.hisp.dhis.dxf2.events.event.ImportEventTask.run(ImportEventTask.j

ava:86)

at org.springframework.scheduling.support.DelegatingErrorHandlingRunnabl

e.run(DelegatingErrorHandlingRunnable.java:53)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

access$201(ScheduledThreadPoolExecutor.java:178)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

run(ScheduledThreadPoolExecutor.java:292)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

.java:615)

at java.lang.Thread.run(Thread.java:744)

  • ERROR 2014-01-26 19:13:43,610 Unexpected error occurred in scheduled task. (Ta

skUtils.java [taskScheduler-1])

org.springframework.transaction.UnexpectedRollbackException: Transaction rolled

back because it has been marked as rollback-only

at org.springframework.transaction.support.AbstractPlatformTransactionMa

nager.commit(AbstractPlatformTransactionManager.java:718)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

completeTransactionAfterThrowing(TransactionAspectSupport.java:513)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

invokeWithinTransaction(TransactionAspectSupport.java:264)

at org.springframework.transaction.interceptor.TransactionInterceptor.in

voke(TransactionInterceptor.java:94)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:172)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami

cAopProxy.java:204)

at com.sun.proxy.$Proxy105.saveEventsXml(Unknown Source)

at org.hisp.dhis.dxf2.events.event.ImportEventTask.run(ImportEventTask.j

ava:86)

at org.springframework.scheduling.support.DelegatingErrorHandlingRunnabl

e.run(DelegatingErrorHandlingRunnable.java:53)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

access$201(ScheduledThreadPoolExecutor.java:178)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

run(ScheduledThreadPoolExecutor.java:292)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

.java:615)

at java.lang.Thread.run(Thread.java:744)

···

On Sun, Jan 26, 2014 at 11:55 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

That seems very old… can you try this direct link:
http://apps.dhis2.org/ci/job/dhis-2.13/lastSuccessfulBuild/artifact/dhis-2/dhis-web/dhis-web-portal/target/dhis.war

This was built today


Morten

On Sun, Jan 26, 2014 at 5:48 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten, I have just donwloaded the war file again. The revision is 12947. And the date 2014-01-20 21:20

So maybe the war file I am downloading is not updated yet?

On Sun, Jan 26, 2014 at 4:59 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Which revision?

On Jan 26, 2014 2:46 AM, “Jose Garcia Muñoz” josemp10@gmail.com wrote:

Hi Morten,

I downloaded the 2.13 war version this Saturday at 13.30 (Oslo time). Unfortunately I´ve got the same results than before. I have also tested the demo with same results as well.

On Fri, Jan 24, 2014 at 5:48 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

Please give our servers a bit of time to compile… then download and try again. It should work now.


Morten

On Thu, Jan 23, 2014 at 1:38 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

Still, it is not working. I have tried with the demo version and with the war file (2.13 version) that I downloaded at 19:30 Oslo time (Wednesday).

Yep, with cURL you are not going to get any error, but if you send a list of events the system is only going to store the last one. You can do the test with the file previously attached (eventsList.xml) that shoud introduce 5 events in the OrgUnit “Njandama MCHP”.

Many thanks for your time

Jose

On Wed, Jan 22, 2014 at 10:29 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

I have fixed this issue now, the problem was that it defaulted to JSON format… and there was no way to change it. Now the UI allows you to select the format (default XML), and do the import. I tested it with 10 events now, and it was working fine.

Could you try it again? I will backport to 2.13, 2.14, and our download server should be updated in a couple of hours.

I had no problem when I used cURL though…


Morten

On Tue, Jan 21, 2014 at 7:30 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Dear all,

From PSI, we need to automatically introduce into DHIS2 thousands of single events without registration, so we would like to use the Event Data Import service of DHIS2. However, it seems that that funcionality was not really working as nothing was happening in the system, although I did not receive any error message in the Catalina.out:

INFO 2014-01-20 21:42:22,909 [Level: INFO, category: EVENT_IMPORT, time: Mon Jan 20 21:42:22 UTC 2014, message: Importing events] (InMemoryNotifier.java [taskScheduler-8])

I tried to replicate the same problem in the Sierra Leone Demo instance, so first at all I used the Event Data Export to get one xml example of the program “Inpatient Morbidity and Mortality” under the OrgUnit “Njandama MCHP”, I edited the xml file and when I tried to import it, again, nothing happened. Please find attached in this email a copy of that file (named as events.xml), as maybe I am missing something…

However, when if I use the curl utility to call the API:( curl -d @events.xmlhttp://apps.dhis2.org/demo/api/events” -H “Content-Type:application/xml” -u admin:district -v ) the event is correctly stored in the database.

BUT, if we have several events in the same file, as in the attached file eventsList.xml, it seems that the API only is storing the last event.

Any ideas?

We are using the 2.13 version till the end of March, so it would be nice if you could look for a solution in the 2.13 version as well :).

Many thanks

Jose


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

This must be related to something else, can you try with status=“ACTIVE” ?

···


Morten

On Mon, Jan 27, 2014 at 1:33 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

I am using the 12953 revision now.

Still getting errors when I try to import SEwoR (it does not matter if am using the uid or the code). The tomcat writes the following error:

There are some Spanish sentences (sorry). The first one said: “The insertion in the table patiendatavalue violates the foreign key fk_patientdatavalue_programstageinstance”

The second one: “The key (programstageinstanceid)=(0) is not presented in the table programstageinstane”.

Any ideas?

  • INFO 2014-01-26 19:13:41,695 ‘josemp10’ update org.hisp.dhis.program.ProgramS

tageInstance, uid: ZBQZwXnO2xN (AuditLogUtil.java [taskScheduler-1])

  • INFO 2014-01-26 19:13:41,909 ‘josemp10’ create org.hisp.dhis.program.ProgramS

tageInstance, uid: ZBQZwXnO2xN (AuditLogUtil.java [taskScheduler-1])

  • WARN 2014-01-26 19:13:43,495 SQL Error: 0, SQLState: 23503 (SqlExceptionHelpe

r.java [taskScheduler-1])

  • ERROR 2014-01-26 19:13:43,496 ERROR: inserci¾n o actualizaci¾n en la tabla ½pa

tientdatavalue╗ viola la llave forßnea ½fk_patientdatavalue_programstageinstance

id╗

Detail: La llave (programstageinstanceid)=(0) no estß presente en la tabla ½pr

ogramstageinstance╗. (SqlExceptionHelper.java [taskScheduler-1])

  • ERROR 2014-01-26 19:13:43,570 Application exception overridden by commit excep

tion (TransactionAspectSupport.java [taskScheduler-1])

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized f

ield “eventList” (class org.hisp.dhis.dxf2.events.event.Event), not marked as ig

norable (11 known properties: , “program”, “orgUnit”, “eventDate”, “href”, "data

Values", “status”, “person”, “coordinate”, “event”, “storedBy”, “programStage”])

at [Source: java.io.StringReader@7f3e53d5; line: 4, column: 144] (through refer

ence chain: org.hisp.dhis.dxf2.events.event.Event[“eventList”])

at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from

(UnrecognizedPropertyException.java:79)

at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownPr

operty(DeserializationContext.java:568)

at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknow

nProperty(StdDeserializer.java:650)

at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnkno

wnProperty(BeanDeserializerBase.java:830)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFrom

Object(BeanDeserializer.java:310)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(Bea

nDeserializer.java:112)

at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMa

pper.java:2580)

at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.ja

va:1810)

at org.hisp.dhis.dxf2.events.event.JacksonEventService.fromXml(JacksonEv

entService.java:76)

at org.hisp.dhis.dxf2.events.event.JacksonEventService.saveEventsXml(Jac

ksonEventService.java:133)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti

on(AopUtils.java:317)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo

inpoint(ReflectiveMethodInvocation.java:183)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:150)

at org.springframework.transaction.interceptor.TransactionInterceptor$1.

proceedWithInvocation(TransactionInterceptor.java:96)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

invokeWithinTransaction(TransactionAspectSupport.java:260)

at org.springframework.transaction.interceptor.TransactionInterceptor.in

voke(TransactionInterceptor.java:94)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:172)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami

cAopProxy.java:204)

at com.sun.proxy.$Proxy105.saveEventsXml(Unknown Source)

at org.hisp.dhis.dxf2.events.event.ImportEventTask.run(ImportEventTask.j

ava:86)

at org.springframework.scheduling.support.DelegatingErrorHandlingRunnabl

e.run(DelegatingErrorHandlingRunnable.java:53)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

access$201(ScheduledThreadPoolExecutor.java:178)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

run(ScheduledThreadPoolExecutor.java:292)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

.java:615)

at java.lang.Thread.run(Thread.java:744)

  • ERROR 2014-01-26 19:13:43,610 Unexpected error occurred in scheduled task. (Ta

skUtils.java [taskScheduler-1])

org.springframework.transaction.UnexpectedRollbackException: Transaction rolled

back because it has been marked as rollback-only

at org.springframework.transaction.support.AbstractPlatformTransactionMa

nager.commit(AbstractPlatformTransactionManager.java:718)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

completeTransactionAfterThrowing(TransactionAspectSupport.java:513)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

invokeWithinTransaction(TransactionAspectSupport.java:264)

at org.springframework.transaction.interceptor.TransactionInterceptor.in

voke(TransactionInterceptor.java:94)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:172)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami

cAopProxy.java:204)

at com.sun.proxy.$Proxy105.saveEventsXml(Unknown Source)

at org.hisp.dhis.dxf2.events.event.ImportEventTask.run(ImportEventTask.j

ava:86)

at org.springframework.scheduling.support.DelegatingErrorHandlingRunnabl

e.run(DelegatingErrorHandlingRunnable.java:53)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

access$201(ScheduledThreadPoolExecutor.java:178)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

run(ScheduledThreadPoolExecutor.java:292)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

.java:615)

at java.lang.Thread.run(Thread.java:744)

On Sun, Jan 26, 2014 at 11:55 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

That seems very old… can you try this direct link:
http://apps.dhis2.org/ci/job/dhis-2.13/lastSuccessfulBuild/artifact/dhis-2/dhis-web/dhis-web-portal/target/dhis.war

This was built today


Morten

On Sun, Jan 26, 2014 at 5:48 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten, I have just donwloaded the war file again. The revision is 12947. And the date 2014-01-20 21:20

So maybe the war file I am downloading is not updated yet?

On Sun, Jan 26, 2014 at 4:59 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Which revision?

On Jan 26, 2014 2:46 AM, “Jose Garcia Muñoz” josemp10@gmail.com wrote:

Hi Morten,

I downloaded the 2.13 war version this Saturday at 13.30 (Oslo time). Unfortunately I´ve got the same results than before. I have also tested the demo with same results as well.

On Fri, Jan 24, 2014 at 5:48 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

Please give our servers a bit of time to compile… then download and try again. It should work now.


Morten

On Thu, Jan 23, 2014 at 1:38 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

Still, it is not working. I have tried with the demo version and with the war file (2.13 version) that I downloaded at 19:30 Oslo time (Wednesday).

Yep, with cURL you are not going to get any error, but if you send a list of events the system is only going to store the last one. You can do the test with the file previously attached (eventsList.xml) that shoud introduce 5 events in the OrgUnit “Njandama MCHP”.

Many thanks for your time

Jose

On Wed, Jan 22, 2014 at 10:29 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

I have fixed this issue now, the problem was that it defaulted to JSON format… and there was no way to change it. Now the UI allows you to select the format (default XML), and do the import. I tested it with 10 events now, and it was working fine.

Could you try it again? I will backport to 2.13, 2.14, and our download server should be updated in a couple of hours.

I had no problem when I used cURL though…


Morten

On Tue, Jan 21, 2014 at 7:30 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Dear all,

From PSI, we need to automatically introduce into DHIS2 thousands of single events without registration, so we would like to use the Event Data Import service of DHIS2. However, it seems that that funcionality was not really working as nothing was happening in the system, although I did not receive any error message in the Catalina.out:

INFO 2014-01-20 21:42:22,909 [Level: INFO, category: EVENT_IMPORT, time: Mon Jan 20 21:42:22 UTC 2014, message: Importing events] (InMemoryNotifier.java [taskScheduler-8])

I tried to replicate the same problem in the Sierra Leone Demo instance, so first at all I used the Event Data Export to get one xml example of the program “Inpatient Morbidity and Mortality” under the OrgUnit “Njandama MCHP”, I edited the xml file and when I tried to import it, again, nothing happened. Please find attached in this email a copy of that file (named as events.xml), as maybe I am missing something…

However, when if I use the curl utility to call the API:( curl -d @events.xmlhttp://apps.dhis2.org/demo/api/events” -H “Content-Type:application/xml” -u admin:district -v ) the event is correctly stored in the database.

BUT, if we have several events in the same file, as in the attached file eventsList.xml, it seems that the API only is storing the last event.

Any ideas?

We are using the 2.13 version till the end of March, so it would be nice if you could look for a solution in the 2.13 version as well :).

Many thanks

Jose


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

Great! With the status=“ACTIVE” everything are working: UIDs, codes, WEB UI, API,…

Would it be possible to allow also “COMPLETE” status?

Thanks Morten!

···

On Sun, Jan 26, 2014 at 7:42 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

This must be related to something else, can you try with status=“ACTIVE” ?


Morten

On Mon, Jan 27, 2014 at 1:33 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

I am using the 12953 revision now.

Still getting errors when I try to import SEwoR (it does not matter if am using the uid or the code). The tomcat writes the following error:

There are some Spanish sentences (sorry). The first one said: “The insertion in the table patiendatavalue violates the foreign key fk_patientdatavalue_programstageinstance”

The second one: “The key (programstageinstanceid)=(0) is not presented in the table programstageinstane”.

Any ideas?

  • INFO 2014-01-26 19:13:41,695 ‘josemp10’ update org.hisp.dhis.program.ProgramS

tageInstance, uid: ZBQZwXnO2xN (AuditLogUtil.java [taskScheduler-1])

  • INFO 2014-01-26 19:13:41,909 ‘josemp10’ create org.hisp.dhis.program.ProgramS

tageInstance, uid: ZBQZwXnO2xN (AuditLogUtil.java [taskScheduler-1])

  • WARN 2014-01-26 19:13:43,495 SQL Error: 0, SQLState: 23503 (SqlExceptionHelpe

r.java [taskScheduler-1])

  • ERROR 2014-01-26 19:13:43,496 ERROR: inserci¾n o actualizaci¾n en la tabla ½pa

tientdatavalue╗ viola la llave forßnea ½fk_patientdatavalue_programstageinstance

id╗

Detail: La llave (programstageinstanceid)=(0) no estß presente en la tabla ½pr

ogramstageinstance╗. (SqlExceptionHelper.java [taskScheduler-1])

  • ERROR 2014-01-26 19:13:43,570 Application exception overridden by commit excep

tion (TransactionAspectSupport.java [taskScheduler-1])

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized f

ield “eventList” (class org.hisp.dhis.dxf2.events.event.Event), not marked as ig

norable (11 known properties: , “program”, “orgUnit”, “eventDate”, “href”, "data

Values", “status”, “person”, “coordinate”, “event”, “storedBy”, “programStage”])

at [Source: java.io.StringReader@7f3e53d5; line: 4, column: 144] (through refer

ence chain: org.hisp.dhis.dxf2.events.event.Event[“eventList”])

at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from

(UnrecognizedPropertyException.java:79)

at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownPr

operty(DeserializationContext.java:568)

at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknow

nProperty(StdDeserializer.java:650)

at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnkno

wnProperty(BeanDeserializerBase.java:830)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFrom

Object(BeanDeserializer.java:310)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(Bea

nDeserializer.java:112)

at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMa

pper.java:2580)

at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.ja

va:1810)

at org.hisp.dhis.dxf2.events.event.JacksonEventService.fromXml(JacksonEv

entService.java:76)

at org.hisp.dhis.dxf2.events.event.JacksonEventService.saveEventsXml(Jac

ksonEventService.java:133)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti

on(AopUtils.java:317)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo

inpoint(ReflectiveMethodInvocation.java:183)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:150)

at org.springframework.transaction.interceptor.TransactionInterceptor$1.

proceedWithInvocation(TransactionInterceptor.java:96)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

invokeWithinTransaction(TransactionAspectSupport.java:260)

at org.springframework.transaction.interceptor.TransactionInterceptor.in

voke(TransactionInterceptor.java:94)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:172)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami

cAopProxy.java:204)

at com.sun.proxy.$Proxy105.saveEventsXml(Unknown Source)

at org.hisp.dhis.dxf2.events.event.ImportEventTask.run(ImportEventTask.j

ava:86)

at org.springframework.scheduling.support.DelegatingErrorHandlingRunnabl

e.run(DelegatingErrorHandlingRunnable.java:53)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

access$201(ScheduledThreadPoolExecutor.java:178)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

run(ScheduledThreadPoolExecutor.java:292)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

.java:615)

at java.lang.Thread.run(Thread.java:744)

  • ERROR 2014-01-26 19:13:43,610 Unexpected error occurred in scheduled task. (Ta

skUtils.java [taskScheduler-1])

org.springframework.transaction.UnexpectedRollbackException: Transaction rolled

back because it has been marked as rollback-only

at org.springframework.transaction.support.AbstractPlatformTransactionMa

nager.commit(AbstractPlatformTransactionManager.java:718)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

completeTransactionAfterThrowing(TransactionAspectSupport.java:513)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

invokeWithinTransaction(TransactionAspectSupport.java:264)

at org.springframework.transaction.interceptor.TransactionInterceptor.in

voke(TransactionInterceptor.java:94)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:172)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami

cAopProxy.java:204)

at com.sun.proxy.$Proxy105.saveEventsXml(Unknown Source)

at org.hisp.dhis.dxf2.events.event.ImportEventTask.run(ImportEventTask.j

ava:86)

at org.springframework.scheduling.support.DelegatingErrorHandlingRunnabl

e.run(DelegatingErrorHandlingRunnable.java:53)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

access$201(ScheduledThreadPoolExecutor.java:178)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

run(ScheduledThreadPoolExecutor.java:292)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

.java:615)

at java.lang.Thread.run(Thread.java:744)

On Sun, Jan 26, 2014 at 11:55 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

That seems very old… can you try this direct link:
http://apps.dhis2.org/ci/job/dhis-2.13/lastSuccessfulBuild/artifact/dhis-2/dhis-web/dhis-web-portal/target/dhis.war

This was built today


Morten

On Sun, Jan 26, 2014 at 5:48 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten, I have just donwloaded the war file again. The revision is 12947. And the date 2014-01-20 21:20

So maybe the war file I am downloading is not updated yet?

On Sun, Jan 26, 2014 at 4:59 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Which revision?

On Jan 26, 2014 2:46 AM, “Jose Garcia Muñoz” josemp10@gmail.com wrote:

Hi Morten,

I downloaded the 2.13 war version this Saturday at 13.30 (Oslo time). Unfortunately I´ve got the same results than before. I have also tested the demo with same results as well.

On Fri, Jan 24, 2014 at 5:48 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

Please give our servers a bit of time to compile… then download and try again. It should work now.


Morten

On Thu, Jan 23, 2014 at 1:38 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

Still, it is not working. I have tried with the demo version and with the war file (2.13 version) that I downloaded at 19:30 Oslo time (Wednesday).

Yep, with cURL you are not going to get any error, but if you send a list of events the system is only going to store the last one. You can do the test with the file previously attached (eventsList.xml) that shoud introduce 5 events in the OrgUnit “Njandama MCHP”.

Many thanks for your time

Jose

On Wed, Jan 22, 2014 at 10:29 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

I have fixed this issue now, the problem was that it defaulted to JSON format… and there was no way to change it. Now the UI allows you to select the format (default XML), and do the import. I tested it with 10 events now, and it was working fine.

Could you try it again? I will backport to 2.13, 2.14, and our download server should be updated in a couple of hours.

I had no problem when I used cURL though…


Morten

On Tue, Jan 21, 2014 at 7:30 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Dear all,

From PSI, we need to automatically introduce into DHIS2 thousands of single events without registration, so we would like to use the Event Data Import service of DHIS2. However, it seems that that funcionality was not really working as nothing was happening in the system, although I did not receive any error message in the Catalina.out:

INFO 2014-01-20 21:42:22,909 [Level: INFO, category: EVENT_IMPORT, time: Mon Jan 20 21:42:22 UTC 2014, message: Importing events] (InMemoryNotifier.java [taskScheduler-8])

I tried to replicate the same problem in the Sierra Leone Demo instance, so first at all I used the Event Data Export to get one xml example of the program “Inpatient Morbidity and Mortality” under the OrgUnit “Njandama MCHP”, I edited the xml file and when I tried to import it, again, nothing happened. Please find attached in this email a copy of that file (named as events.xml), as maybe I am missing something…

However, when if I use the curl utility to call the API:( curl -d @events.xmlhttp://apps.dhis2.org/demo/api/events” -H “Content-Type:application/xml” -u admin:district -v ) the event is correctly stored in the database.

BUT, if we have several events in the same file, as in the attached file eventsList.xml, it seems that the API only is storing the last event.

Any ideas?

We are using the 2.13 version till the end of March, so it would be nice if you could look for a solution in the 2.13 version as well :).

Many thanks

Jose


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

Yes, it should work… but something has changed in the tracker api, I will have a look at it

···


Morten

On Mon, Jan 27, 2014 at 2:14 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Great! With the status=“ACTIVE” everything are working: UIDs, codes, WEB UI, API,…

Would it be possible to allow also “COMPLETE” status?

Thanks Morten!

On Sun, Jan 26, 2014 at 7:42 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

This must be related to something else, can you try with status=“ACTIVE” ?


Morten

On Mon, Jan 27, 2014 at 1:33 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

I am using the 12953 revision now.

Still getting errors when I try to import SEwoR (it does not matter if am using the uid or the code). The tomcat writes the following error:

There are some Spanish sentences (sorry). The first one said: “The insertion in the table patiendatavalue violates the foreign key fk_patientdatavalue_programstageinstance”

The second one: “The key (programstageinstanceid)=(0) is not presented in the table programstageinstane”.

Any ideas?

  • INFO 2014-01-26 19:13:41,695 ‘josemp10’ update org.hisp.dhis.program.ProgramS

tageInstance, uid: ZBQZwXnO2xN (AuditLogUtil.java [taskScheduler-1])

  • INFO 2014-01-26 19:13:41,909 ‘josemp10’ create org.hisp.dhis.program.ProgramS

tageInstance, uid: ZBQZwXnO2xN (AuditLogUtil.java [taskScheduler-1])

  • WARN 2014-01-26 19:13:43,495 SQL Error: 0, SQLState: 23503 (SqlExceptionHelpe

r.java [taskScheduler-1])

  • ERROR 2014-01-26 19:13:43,496 ERROR: inserci¾n o actualizaci¾n en la tabla ½pa

tientdatavalue╗ viola la llave forßnea ½fk_patientdatavalue_programstageinstance

id╗

Detail: La llave (programstageinstanceid)=(0) no estß presente en la tabla ½pr

ogramstageinstance╗. (SqlExceptionHelper.java [taskScheduler-1])

  • ERROR 2014-01-26 19:13:43,570 Application exception overridden by commit excep

tion (TransactionAspectSupport.java [taskScheduler-1])

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized f

ield “eventList” (class org.hisp.dhis.dxf2.events.event.Event), not marked as ig

norable (11 known properties: , “program”, “orgUnit”, “eventDate”, “href”, "data

Values", “status”, “person”, “coordinate”, “event”, “storedBy”, “programStage”])

at [Source: java.io.StringReader@7f3e53d5; line: 4, column: 144] (through refer

ence chain: org.hisp.dhis.dxf2.events.event.Event[“eventList”])

at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from

(UnrecognizedPropertyException.java:79)

at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownPr

operty(DeserializationContext.java:568)

at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknow

nProperty(StdDeserializer.java:650)

at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnkno

wnProperty(BeanDeserializerBase.java:830)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFrom

Object(BeanDeserializer.java:310)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(Bea

nDeserializer.java:112)

at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMa

pper.java:2580)

at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.ja

va:1810)

at org.hisp.dhis.dxf2.events.event.JacksonEventService.fromXml(JacksonEv

entService.java:76)

at org.hisp.dhis.dxf2.events.event.JacksonEventService.saveEventsXml(Jac

ksonEventService.java:133)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti

on(AopUtils.java:317)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo

inpoint(ReflectiveMethodInvocation.java:183)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:150)

at org.springframework.transaction.interceptor.TransactionInterceptor$1.

proceedWithInvocation(TransactionInterceptor.java:96)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

invokeWithinTransaction(TransactionAspectSupport.java:260)

at org.springframework.transaction.interceptor.TransactionInterceptor.in

voke(TransactionInterceptor.java:94)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:172)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami

cAopProxy.java:204)

at com.sun.proxy.$Proxy105.saveEventsXml(Unknown Source)

at org.hisp.dhis.dxf2.events.event.ImportEventTask.run(ImportEventTask.j

ava:86)

at org.springframework.scheduling.support.DelegatingErrorHandlingRunnabl

e.run(DelegatingErrorHandlingRunnable.java:53)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

access$201(ScheduledThreadPoolExecutor.java:178)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

run(ScheduledThreadPoolExecutor.java:292)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

.java:615)

at java.lang.Thread.run(Thread.java:744)

  • ERROR 2014-01-26 19:13:43,610 Unexpected error occurred in scheduled task. (Ta

skUtils.java [taskScheduler-1])

org.springframework.transaction.UnexpectedRollbackException: Transaction rolled

back because it has been marked as rollback-only

at org.springframework.transaction.support.AbstractPlatformTransactionMa

nager.commit(AbstractPlatformTransactionManager.java:718)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

completeTransactionAfterThrowing(TransactionAspectSupport.java:513)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

invokeWithinTransaction(TransactionAspectSupport.java:264)

at org.springframework.transaction.interceptor.TransactionInterceptor.in

voke(TransactionInterceptor.java:94)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:172)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami

cAopProxy.java:204)

at com.sun.proxy.$Proxy105.saveEventsXml(Unknown Source)

at org.hisp.dhis.dxf2.events.event.ImportEventTask.run(ImportEventTask.j

ava:86)

at org.springframework.scheduling.support.DelegatingErrorHandlingRunnabl

e.run(DelegatingErrorHandlingRunnable.java:53)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

access$201(ScheduledThreadPoolExecutor.java:178)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

run(ScheduledThreadPoolExecutor.java:292)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

.java:615)

at java.lang.Thread.run(Thread.java:744)

On Sun, Jan 26, 2014 at 11:55 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

That seems very old… can you try this direct link:
http://apps.dhis2.org/ci/job/dhis-2.13/lastSuccessfulBuild/artifact/dhis-2/dhis-web/dhis-web-portal/target/dhis.war

This was built today


Morten

On Sun, Jan 26, 2014 at 5:48 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten, I have just donwloaded the war file again. The revision is 12947. And the date 2014-01-20 21:20

So maybe the war file I am downloading is not updated yet?

On Sun, Jan 26, 2014 at 4:59 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Which revision?

On Jan 26, 2014 2:46 AM, “Jose Garcia Muñoz” josemp10@gmail.com wrote:

Hi Morten,

I downloaded the 2.13 war version this Saturday at 13.30 (Oslo time). Unfortunately I´ve got the same results than before. I have also tested the demo with same results as well.

On Fri, Jan 24, 2014 at 5:48 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

Please give our servers a bit of time to compile… then download and try again. It should work now.


Morten

On Thu, Jan 23, 2014 at 1:38 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

Still, it is not working. I have tried with the demo version and with the war file (2.13 version) that I downloaded at 19:30 Oslo time (Wednesday).

Yep, with cURL you are not going to get any error, but if you send a list of events the system is only going to store the last one. You can do the test with the file previously attached (eventsList.xml) that shoud introduce 5 events in the OrgUnit “Njandama MCHP”.

Many thanks for your time

Jose

On Wed, Jan 22, 2014 at 10:29 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

I have fixed this issue now, the problem was that it defaulted to JSON format… and there was no way to change it. Now the UI allows you to select the format (default XML), and do the import. I tested it with 10 events now, and it was working fine.

Could you try it again? I will backport to 2.13, 2.14, and our download server should be updated in a couple of hours.

I had no problem when I used cURL though…


Morten

On Tue, Jan 21, 2014 at 7:30 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Dear all,

From PSI, we need to automatically introduce into DHIS2 thousands of single events without registration, so we would like to use the Event Data Import service of DHIS2. However, it seems that that funcionality was not really working as nothing was happening in the system, although I did not receive any error message in the Catalina.out:

INFO 2014-01-20 21:42:22,909 [Level: INFO, category: EVENT_IMPORT, time: Mon Jan 20 21:42:22 UTC 2014, message: Importing events] (InMemoryNotifier.java [taskScheduler-8])

I tried to replicate the same problem in the Sierra Leone Demo instance, so first at all I used the Event Data Export to get one xml example of the program “Inpatient Morbidity and Mortality” under the OrgUnit “Njandama MCHP”, I edited the xml file and when I tried to import it, again, nothing happened. Please find attached in this email a copy of that file (named as events.xml), as maybe I am missing something…

However, when if I use the curl utility to call the API:( curl -d @events.xmlhttp://apps.dhis2.org/demo/api/events” -H “Content-Type:application/xml” -u admin:district -v ) the event is correctly stored in the database.

BUT, if we have several events in the same file, as in the attached file eventsList.xml, it seems that the API only is storing the last event.

Any ideas?

We are using the 2.13 version till the end of March, so it would be nice if you could look for a solution in the 2.13 version as well :).

Many thanks

Jose


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

This should now work properly, give our servers a little time to compile a new version (2 hours time should do it)

···


Morten

On Mon, Jan 27, 2014 at 9:37 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Yes, it should work… but something has changed in the tracker api, I will have a look at it


Morten

On Mon, Jan 27, 2014 at 2:14 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Great! With the status=“ACTIVE” everything are working: UIDs, codes, WEB UI, API,…

Would it be possible to allow also “COMPLETE” status?

Thanks Morten!

On Sun, Jan 26, 2014 at 7:42 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

This must be related to something else, can you try with status=“ACTIVE” ?


Morten

On Mon, Jan 27, 2014 at 1:33 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

I am using the 12953 revision now.

Still getting errors when I try to import SEwoR (it does not matter if am using the uid or the code). The tomcat writes the following error:

There are some Spanish sentences (sorry). The first one said: “The insertion in the table patiendatavalue violates the foreign key fk_patientdatavalue_programstageinstance”

The second one: “The key (programstageinstanceid)=(0) is not presented in the table programstageinstane”.

Any ideas?

  • INFO 2014-01-26 19:13:41,695 ‘josemp10’ update org.hisp.dhis.program.ProgramS

tageInstance, uid: ZBQZwXnO2xN (AuditLogUtil.java [taskScheduler-1])

  • INFO 2014-01-26 19:13:41,909 ‘josemp10’ create org.hisp.dhis.program.ProgramS

tageInstance, uid: ZBQZwXnO2xN (AuditLogUtil.java [taskScheduler-1])

  • WARN 2014-01-26 19:13:43,495 SQL Error: 0, SQLState: 23503 (SqlExceptionHelpe

r.java [taskScheduler-1])

  • ERROR 2014-01-26 19:13:43,496 ERROR: inserci¾n o actualizaci¾n en la tabla ½pa

tientdatavalue╗ viola la llave forßnea ½fk_patientdatavalue_programstageinstance

id╗

Detail: La llave (programstageinstanceid)=(0) no estß presente en la tabla ½pr

ogramstageinstance╗. (SqlExceptionHelper.java [taskScheduler-1])

  • ERROR 2014-01-26 19:13:43,570 Application exception overridden by commit excep

tion (TransactionAspectSupport.java [taskScheduler-1])

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized f

ield “eventList” (class org.hisp.dhis.dxf2.events.event.Event), not marked as ig

norable (11 known properties: , “program”, “orgUnit”, “eventDate”, “href”, "data

Values", “status”, “person”, “coordinate”, “event”, “storedBy”, “programStage”])

at [Source: java.io.StringReader@7f3e53d5; line: 4, column: 144] (through refer

ence chain: org.hisp.dhis.dxf2.events.event.Event[“eventList”])

at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from

(UnrecognizedPropertyException.java:79)

at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownPr

operty(DeserializationContext.java:568)

at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknow

nProperty(StdDeserializer.java:650)

at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnkno

wnProperty(BeanDeserializerBase.java:830)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFrom

Object(BeanDeserializer.java:310)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(Bea

nDeserializer.java:112)

at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMa

pper.java:2580)

at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.ja

va:1810)

at org.hisp.dhis.dxf2.events.event.JacksonEventService.fromXml(JacksonEv

entService.java:76)

at org.hisp.dhis.dxf2.events.event.JacksonEventService.saveEventsXml(Jac

ksonEventService.java:133)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti

on(AopUtils.java:317)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo

inpoint(ReflectiveMethodInvocation.java:183)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:150)

at org.springframework.transaction.interceptor.TransactionInterceptor$1.

proceedWithInvocation(TransactionInterceptor.java:96)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

invokeWithinTransaction(TransactionAspectSupport.java:260)

at org.springframework.transaction.interceptor.TransactionInterceptor.in

voke(TransactionInterceptor.java:94)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:172)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami

cAopProxy.java:204)

at com.sun.proxy.$Proxy105.saveEventsXml(Unknown Source)

at org.hisp.dhis.dxf2.events.event.ImportEventTask.run(ImportEventTask.j

ava:86)

at org.springframework.scheduling.support.DelegatingErrorHandlingRunnabl

e.run(DelegatingErrorHandlingRunnable.java:53)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

access$201(ScheduledThreadPoolExecutor.java:178)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

run(ScheduledThreadPoolExecutor.java:292)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

.java:615)

at java.lang.Thread.run(Thread.java:744)

  • ERROR 2014-01-26 19:13:43,610 Unexpected error occurred in scheduled task. (Ta

skUtils.java [taskScheduler-1])

org.springframework.transaction.UnexpectedRollbackException: Transaction rolled

back because it has been marked as rollback-only

at org.springframework.transaction.support.AbstractPlatformTransactionMa

nager.commit(AbstractPlatformTransactionManager.java:718)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

completeTransactionAfterThrowing(TransactionAspectSupport.java:513)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

invokeWithinTransaction(TransactionAspectSupport.java:264)

at org.springframework.transaction.interceptor.TransactionInterceptor.in

voke(TransactionInterceptor.java:94)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:172)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami

cAopProxy.java:204)

at com.sun.proxy.$Proxy105.saveEventsXml(Unknown Source)

at org.hisp.dhis.dxf2.events.event.ImportEventTask.run(ImportEventTask.j

ava:86)

at org.springframework.scheduling.support.DelegatingErrorHandlingRunnabl

e.run(DelegatingErrorHandlingRunnable.java:53)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

access$201(ScheduledThreadPoolExecutor.java:178)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

run(ScheduledThreadPoolExecutor.java:292)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

.java:615)

at java.lang.Thread.run(Thread.java:744)

On Sun, Jan 26, 2014 at 11:55 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

That seems very old… can you try this direct link:
http://apps.dhis2.org/ci/job/dhis-2.13/lastSuccessfulBuild/artifact/dhis-2/dhis-web/dhis-web-portal/target/dhis.war

This was built today


Morten

On Sun, Jan 26, 2014 at 5:48 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten, I have just donwloaded the war file again. The revision is 12947. And the date 2014-01-20 21:20

So maybe the war file I am downloading is not updated yet?

On Sun, Jan 26, 2014 at 4:59 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Which revision?

On Jan 26, 2014 2:46 AM, “Jose Garcia Muñoz” josemp10@gmail.com wrote:

Hi Morten,

I downloaded the 2.13 war version this Saturday at 13.30 (Oslo time). Unfortunately I´ve got the same results than before. I have also tested the demo with same results as well.

On Fri, Jan 24, 2014 at 5:48 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

Please give our servers a bit of time to compile… then download and try again. It should work now.


Morten

On Thu, Jan 23, 2014 at 1:38 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

Still, it is not working. I have tried with the demo version and with the war file (2.13 version) that I downloaded at 19:30 Oslo time (Wednesday).

Yep, with cURL you are not going to get any error, but if you send a list of events the system is only going to store the last one. You can do the test with the file previously attached (eventsList.xml) that shoud introduce 5 events in the OrgUnit “Njandama MCHP”.

Many thanks for your time

Jose

On Wed, Jan 22, 2014 at 10:29 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

I have fixed this issue now, the problem was that it defaulted to JSON format… and there was no way to change it. Now the UI allows you to select the format (default XML), and do the import. I tested it with 10 events now, and it was working fine.

Could you try it again? I will backport to 2.13, 2.14, and our download server should be updated in a couple of hours.

I had no problem when I used cURL though…


Morten

On Tue, Jan 21, 2014 at 7:30 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Dear all,

From PSI, we need to automatically introduce into DHIS2 thousands of single events without registration, so we would like to use the Event Data Import service of DHIS2. However, it seems that that funcionality was not really working as nothing was happening in the system, although I did not receive any error message in the Catalina.out:

INFO 2014-01-20 21:42:22,909 [Level: INFO, category: EVENT_IMPORT, time: Mon Jan 20 21:42:22 UTC 2014, message: Importing events] (InMemoryNotifier.java [taskScheduler-8])

I tried to replicate the same problem in the Sierra Leone Demo instance, so first at all I used the Event Data Export to get one xml example of the program “Inpatient Morbidity and Mortality” under the OrgUnit “Njandama MCHP”, I edited the xml file and when I tried to import it, again, nothing happened. Please find attached in this email a copy of that file (named as events.xml), as maybe I am missing something…

However, when if I use the curl utility to call the API:( curl -d @events.xmlhttp://apps.dhis2.org/demo/api/events” -H “Content-Type:application/xml” -u admin:district -v ) the event is correctly stored in the database.

BUT, if we have several events in the same file, as in the attached file eventsList.xml, it seems that the API only is storing the last event.

Any ideas?

We are using the 2.13 version till the end of March, so it would be nice if you could look for a solution in the 2.13 version as well :).

Many thanks

Jose


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

Yup, I can import events with “completed” status now. Great! Thanks Morten!!

···

On Mon, Jan 27, 2014 at 11:18 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

This should now work properly, give our servers a little time to compile a new version (2 hours time should do it)


Morten

On Mon, Jan 27, 2014 at 9:37 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Yes, it should work… but something has changed in the tracker api, I will have a look at it


Morten

On Mon, Jan 27, 2014 at 2:14 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Great! With the status=“ACTIVE” everything are working: UIDs, codes, WEB UI, API,…

Would it be possible to allow also “COMPLETE” status?

Thanks Morten!

On Sun, Jan 26, 2014 at 7:42 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

This must be related to something else, can you try with status=“ACTIVE” ?


Morten

On Mon, Jan 27, 2014 at 1:33 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

I am using the 12953 revision now.

Still getting errors when I try to import SEwoR (it does not matter if am using the uid or the code). The tomcat writes the following error:

There are some Spanish sentences (sorry). The first one said: “The insertion in the table patiendatavalue violates the foreign key fk_patientdatavalue_programstageinstance”

The second one: “The key (programstageinstanceid)=(0) is not presented in the table programstageinstane”.

Any ideas?

  • INFO 2014-01-26 19:13:41,695 ‘josemp10’ update org.hisp.dhis.program.ProgramS

tageInstance, uid: ZBQZwXnO2xN (AuditLogUtil.java [taskScheduler-1])

  • INFO 2014-01-26 19:13:41,909 ‘josemp10’ create org.hisp.dhis.program.ProgramS

tageInstance, uid: ZBQZwXnO2xN (AuditLogUtil.java [taskScheduler-1])

  • WARN 2014-01-26 19:13:43,495 SQL Error: 0, SQLState: 23503 (SqlExceptionHelpe

r.java [taskScheduler-1])

  • ERROR 2014-01-26 19:13:43,496 ERROR: inserci¾n o actualizaci¾n en la tabla ½pa

tientdatavalue╗ viola la llave forßnea ½fk_patientdatavalue_programstageinstance

id╗

Detail: La llave (programstageinstanceid)=(0) no estß presente en la tabla ½pr

ogramstageinstance╗. (SqlExceptionHelper.java [taskScheduler-1])

  • ERROR 2014-01-26 19:13:43,570 Application exception overridden by commit excep

tion (TransactionAspectSupport.java [taskScheduler-1])

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized f

ield “eventList” (class org.hisp.dhis.dxf2.events.event.Event), not marked as ig

norable (11 known properties: , “program”, “orgUnit”, “eventDate”, “href”, "data

Values", “status”, “person”, “coordinate”, “event”, “storedBy”, “programStage”])

at [Source: java.io.StringReader@7f3e53d5; line: 4, column: 144] (through refer

ence chain: org.hisp.dhis.dxf2.events.event.Event[“eventList”])

at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from

(UnrecognizedPropertyException.java:79)

at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownPr

operty(DeserializationContext.java:568)

at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknow

nProperty(StdDeserializer.java:650)

at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnkno

wnProperty(BeanDeserializerBase.java:830)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFrom

Object(BeanDeserializer.java:310)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(Bea

nDeserializer.java:112)

at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMa

pper.java:2580)

at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.ja

va:1810)

at org.hisp.dhis.dxf2.events.event.JacksonEventService.fromXml(JacksonEv

entService.java:76)

at org.hisp.dhis.dxf2.events.event.JacksonEventService.saveEventsXml(Jac

ksonEventService.java:133)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti

on(AopUtils.java:317)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo

inpoint(ReflectiveMethodInvocation.java:183)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:150)

at org.springframework.transaction.interceptor.TransactionInterceptor$1.

proceedWithInvocation(TransactionInterceptor.java:96)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

invokeWithinTransaction(TransactionAspectSupport.java:260)

at org.springframework.transaction.interceptor.TransactionInterceptor.in

voke(TransactionInterceptor.java:94)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:172)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami

cAopProxy.java:204)

at com.sun.proxy.$Proxy105.saveEventsXml(Unknown Source)

at org.hisp.dhis.dxf2.events.event.ImportEventTask.run(ImportEventTask.j

ava:86)

at org.springframework.scheduling.support.DelegatingErrorHandlingRunnabl

e.run(DelegatingErrorHandlingRunnable.java:53)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

access$201(ScheduledThreadPoolExecutor.java:178)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

run(ScheduledThreadPoolExecutor.java:292)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

.java:615)

at java.lang.Thread.run(Thread.java:744)

  • ERROR 2014-01-26 19:13:43,610 Unexpected error occurred in scheduled task. (Ta

skUtils.java [taskScheduler-1])

org.springframework.transaction.UnexpectedRollbackException: Transaction rolled

back because it has been marked as rollback-only

at org.springframework.transaction.support.AbstractPlatformTransactionMa

nager.commit(AbstractPlatformTransactionManager.java:718)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

completeTransactionAfterThrowing(TransactionAspectSupport.java:513)

at org.springframework.transaction.interceptor.TransactionAspectSupport.

invokeWithinTransaction(TransactionAspectSupport.java:264)

at org.springframework.transaction.interceptor.TransactionInterceptor.in

voke(TransactionInterceptor.java:94)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

ReflectiveMethodInvocation.java:172)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami

cAopProxy.java:204)

at com.sun.proxy.$Proxy105.saveEventsXml(Unknown Source)

at org.hisp.dhis.dxf2.events.event.ImportEventTask.run(ImportEventTask.j

ava:86)

at org.springframework.scheduling.support.DelegatingErrorHandlingRunnabl

e.run(DelegatingErrorHandlingRunnable.java:53)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

access$201(ScheduledThreadPoolExecutor.java:178)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.

run(ScheduledThreadPoolExecutor.java:292)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

.java:615)

at java.lang.Thread.run(Thread.java:744)

On Sun, Jan 26, 2014 at 11:55 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

That seems very old… can you try this direct link:
http://apps.dhis2.org/ci/job/dhis-2.13/lastSuccessfulBuild/artifact/dhis-2/dhis-web/dhis-web-portal/target/dhis.war

This was built today


Morten

On Sun, Jan 26, 2014 at 5:48 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten, I have just donwloaded the war file again. The revision is 12947. And the date 2014-01-20 21:20

So maybe the war file I am downloading is not updated yet?

On Sun, Jan 26, 2014 at 4:59 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Which revision?

On Jan 26, 2014 2:46 AM, “Jose Garcia Muñoz” josemp10@gmail.com wrote:

Hi Morten,

I downloaded the 2.13 war version this Saturday at 13.30 (Oslo time). Unfortunately I´ve got the same results than before. I have also tested the demo with same results as well.

On Fri, Jan 24, 2014 at 5:48 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

Please give our servers a bit of time to compile… then download and try again. It should work now.


Morten

On Thu, Jan 23, 2014 at 1:38 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten,

Still, it is not working. I have tried with the demo version and with the war file (2.13 version) that I downloaded at 19:30 Oslo time (Wednesday).

Yep, with cURL you are not going to get any error, but if you send a list of events the system is only going to store the last one. You can do the test with the file previously attached (eventsList.xml) that shoud introduce 5 events in the OrgUnit “Njandama MCHP”.

Many thanks for your time

Jose

On Wed, Jan 22, 2014 at 10:29 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi,

I have fixed this issue now, the problem was that it defaulted to JSON format… and there was no way to change it. Now the UI allows you to select the format (default XML), and do the import. I tested it with 10 events now, and it was working fine.

Could you try it again? I will backport to 2.13, 2.14, and our download server should be updated in a couple of hours.

I had no problem when I used cURL though…


Morten

On Tue, Jan 21, 2014 at 7:30 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Dear all,

From PSI, we need to automatically introduce into DHIS2 thousands of single events without registration, so we would like to use the Event Data Import service of DHIS2. However, it seems that that funcionality was not really working as nothing was happening in the system, although I did not receive any error message in the Catalina.out:

INFO 2014-01-20 21:42:22,909 [Level: INFO, category: EVENT_IMPORT, time: Mon Jan 20 21:42:22 UTC 2014, message: Importing events] (InMemoryNotifier.java [taskScheduler-8])

I tried to replicate the same problem in the Sierra Leone Demo instance, so first at all I used the Event Data Export to get one xml example of the program “Inpatient Morbidity and Mortality” under the OrgUnit “Njandama MCHP”, I edited the xml file and when I tried to import it, again, nothing happened. Please find attached in this email a copy of that file (named as events.xml), as maybe I am missing something…

However, when if I use the curl utility to call the API:( curl -d @events.xmlhttp://apps.dhis2.org/demo/api/events” -H “Content-Type:application/xml” -u admin:district -v ) the event is correctly stored in the database.

BUT, if we have several events in the same file, as in the attached file eventsList.xml, it seems that the API only is storing the last event.

Any ideas?

We are using the 2.13 version till the end of March, so it would be nice if you could look for a solution in the 2.13 version as well :).

Many thanks

Jose


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