← Back to team overview

dhis2-devs team mailing list archive

Re: [Issue] Event Import throws exception

 

Thank you, Morten.

Archana Chillala
Application Developer
Email archanac@xxxxxxxxxxxxxxxx
Telephone +91 9100960533 <+91+9100960533>
[image: ThoughtWorks]
<http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>

On Wed, Mar 30, 2016 at 12:33 PM, Morten Olav Hansen <morten@xxxxxxxxx>
wrote:

> This should be fixed in latest 2.22 and trunk now
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Wed, Mar 30, 2016 at 11:48 AM, Archana Chillala <
> archanac@xxxxxxxxxxxxxxxx> wrote:
>
>> Sure. Thanks, Morten.
>>
>> Archana Chillala
>> Application Developer
>> Email archanac@xxxxxxxxxxxxxxxx
>> Telephone +91 9100960533 <+91+9100960533>
>> [image: ThoughtWorks]
>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>
>> On Wed, Mar 30, 2016 at 7:53 AM, Morten Olav Hansen <morten@xxxxxxxxx>
>> wrote:
>>
>>> Look like this is because we switched over to paged response.. and the
>>> importer doesn't recognize the pager element, will have a look at it
>>>
>>> --
>>> Morten Olav Hansen
>>> Senior Engineer, DHIS 2
>>> University of Oslo
>>> http://www.dhis2.org
>>>
>>> On Tue, Mar 29, 2016 at 7:04 PM, Archana Chillala <
>>> archanac@xxxxxxxxxxxxxxxx> wrote:
>>>
>>>> Hi,
>>>>
>>>> I am using DHIS from the trunk. I am trying to import event data into
>>>> my DHIS instance through the "*Event Import*" module of the
>>>> "Import-Export" application. I tried uploading a JSON file (which has been
>>>> previously exported using "Event Export" module from another instance) with
>>>> events data and clicked on "Import" button, but an exception is thrown.
>>>>
>>>> Please find attached the screenshots and logs depicting the issue.
>>>>
>>>> [image: Inline image 1]
>>>> [image: Inline image 2]
>>>>
>>>>
>>>> Following are the logs generated -
>>>>
>>>> * ERROR 2016-03-29 17:29:10,650 Error while executing action
>>>> (ExceptionInterceptor.java [qtp598569407-929])
>>>> com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:
>>>> Unrecognized field "pager" (class org.hisp.dhis.dxf2.events.event.Event),
>>>> not marked as ignorable (22 known properties: "notes",
>>>> "trackedEntityInstance", "program", "lastUpdated", "orgUnit", "href",
>>>> "dataValues", "status", "orgUnitName", "enrollmentStatus", "coordinate",
>>>> "completedDate", "event", "dueDate", "enrollment", "eventDate", "followup",
>>>> "programStage", "storedBy", "created", "attributeCategoryOptions",
>>>> "completedBy"])
>>>>  at [Source:
>>>> {"pager":{"page":1,"pageCount":1,"total":0,"pageSize":50},"events":[{"programStage":"ATWcRc4wQt4","orgUnit":"TVF9ton80gs","program":"GoRppfwrCoe","href":"
>>>> http://10.136.20.200:8080/api/events/OuCTUwVe5oW","event":"OuCTUwVe5oW","status":"ACTIVE","eventDate":"2016-03-21T18:30:00.000+0000","orgUnitName":"General
>>>> OPD","created":"2016-03-28T06:55:04.887+0000","lastUpdated":"2016-03-28T06:55:04.887+0000","coordinate":{"latitude":0.0,"longitude":0.0},"dataValues":[{"lastUpdated":"2016-03-28T06:55:04.889+0000","storedBy":"admin","created":"2016-03-28T06:55:04.889+0000","dataElement":"VsepNpCsIgt","value":"34","providedElsewhere":false},{"lastUpdated":"2016-03-28T06:55:04.890+0000","storedBy":"admin","created":"2016-03-28T06:55:04.890+0000","dataElement":"Wg98swnv2Qn","value":"12","providedElsewhere":false}],"notes":[]},{"programStage":"ATWcRc4wQt4","orgUnit":"TVF9ton80gs","program":"GoRppfwrCoe","href":"
>>>> http://10.136.20.200:8080/api/events/uFFUSWwvStt","event":"uFFUSWwvStt","status":"ACTIVE","eventDate":"2016-03-23T18:30:00.000+0000","orgUnitName":"General
>>>> OPD","created":"2016-03-28T06:54:25.303+0000","lastUpdated":"2016-03-28T06:54:25.304+0000","coordinate":{"latitude":25.584042,"longitude":83.577019},"dataValues":[{"lastUpdated":"2016-03-28T06:54:25.307+0000","storedBy":"admin","created":"2016-03-28T06:54:25.307+0000","dataElement":"VsepNpCsIgt","value":"23","providedElsewhere":false},{"lastUpdated":"2016-03-28T06:54:25.309+0000","storedBy":"admin","created":"2016-03-28T06:54:25.309+0000","dataElement":"Wg98swnv2Qn","value":"34","providedElsewhere":false}],"notes":[{"storedDate":"2016-03-28
>>>> 12:24:25.303","storedBy":"admin","value":"Event
>>>> 1"}]},{"programStage":"ATWcRc4wQt4","orgUnit":"TVF9ton80gs","program":"GoRppfwrCoe","href":"
>>>> http://10.136.20.200:8080/api/events/dt8DDMeYfz4","event":"dt8DDMeYfz4","status":"ACTIVE","eventDate":"2016-03-26T18:30:00.000+0000","orgUnitName":"General
>>>> OPD","created":"2016-03-28T06:54:02.292+0000","lastUpdated":"2016-03-28T06:54:02.295+0000","coordinate":{"latitude":1.21,"longitude":32.3},"dataValues":[{"lastUpdated":"2016-03-28T06:54:02.298+0000","storedBy":"admin","created":"2016-03-28T06:54:02.297+0000","dataElement":"VsepNpCsIgt","value":"2","providedElsewhere":false},{"lastUpdated":"2016-03-28T06:54:02.299+0000","storedBy":"admin","created":"2016-03-28T06:54:02.299+0000","dataElement":"Wg98swnv2Qn","value":"2","providedElsewhere":false}],"notes":[{"storedDate":"2016-03-28
>>>> 12:24:02.293","storedBy":"admin","value":"comment"}]}]}; line: 1, column:
>>>> 11] (through reference chain:
>>>> org.hisp.dhis.dxf2.events.event.Event["pager"])
>>>> at
>>>> com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:51)
>>>> at
>>>> com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:839)
>>>> at
>>>> com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1045)
>>>> at
>>>> com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1352)
>>>> at
>>>> com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1330)
>>>> at
>>>> com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:264)
>>>> at
>>>> com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
>>>> at
>>>> com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3736)
>>>> at
>>>> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2726)
>>>> at
>>>> org.hisp.dhis.dxf2.events.event.JacksonEventService.fromJson(JacksonEventService.java:80)
>>>> at
>>>> org.hisp.dhis.dxf2.events.event.JacksonEventService.getEventsJson(JacksonEventService.java:126)
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>> at java.lang.reflect.Method.invoke(Method.java:497)
>>>> at
>>>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
>>>> at
>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>>>> at
>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>>>> at
>>>> org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
>>>> at
>>>> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
>>>> at
>>>> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
>>>> at
>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>>>> at
>>>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
>>>> at com.sun.proxy.$Proxy228.getEventsJson(Unknown Source)
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>> at java.lang.reflect.Method.invoke(Method.java:497)
>>>> at
>>>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
>>>> at
>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>>>> at
>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>>>> at
>>>> org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
>>>> at
>>>> org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
>>>> at
>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>>>> at
>>>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
>>>> at com.sun.proxy.$Proxy178.getEventsJson(Unknown Source)
>>>>
>>>>
>>>> Could you help resolve the issue?
>>>>
>>>>
>>>>
>>>> *Thanks*
>>>>
>>>> Archana Chillala
>>>> Application Developer
>>>> Email archanac@xxxxxxxxxxxxxxxx
>>>> Telephone +91 9100960533 <+91+9100960533>
>>>> [image: ThoughtWorks]
>>>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>
>

PNG image

PNG image


References