Re: [Dhis2-devs] Sync Anonymous Event Data along with coordinates code fix

2016-06-16 Thread Morten Olav Hansen
Ok, great. We like to turn off some of this Jackson magic as most of the time you don't really want to expose all fields/getter (unless you have a very strict DTO) -- Morten Olav Hansen Senior Engineer, DHIS 2 University of Oslo http://www.dhis2.org On Thu, Jun 16, 2016 at 7:31 PM, Anilkumar

Re: [Dhis2-devs] Sync Anonymous Event Data along with coordinates code fix

2016-06-16 Thread Anilkumar Kodi
Hi Morten, We identified the problem and found solution as below. *Solution :* As you implemented disabling GETTERS and SETTERS in for deserializing, the same way we need to disable while serializing as well. Thank you so much for your help Regards, Anil On Thu, Jun 16, 2016 at 5:24 PM,

Re: [Dhis2-devs] Sync Anonymous Event Data along with coordinates code fix

2016-06-16 Thread Morten Olav Hansen
Hi If I was you I would use RenderService, this will have a properly pre-configured object mapper. When you just do new ObjectMapper() it uses all the defaults, which are incompatible with DHIS 2 (specifically it enabled auto-discovery) -- Morten Olav Hansen Senior Engineer, DHIS 2 University

Re: [Dhis2-devs] Sync Anonymous Event Data along with coordinates code fix

2016-06-16 Thread Anilkumar Kodi
Sorry Morten, executeAnonymousEventPush which we build for pushing anonymous event data, When we are getting events(which does not have valid and coordinateString field ) and when we are passing that to to write to request, at the time this payload was building. Any idea why are we getting

Re: [Dhis2-devs] Sync Anonymous Event Data along with coordinates code fix

2016-06-16 Thread Morten Olav Hansen
On Thu, Jun 16, 2016 at 6:02 PM, Anilkumar Kodi wrote: > executeAnonymousEventPush What is that? -- Morten Olav Hansen Senior Engineer, DHIS 2 University of Oslo http://www.dhis2.org ___ Mailing list:

Re: [Dhis2-devs] Sync Anonymous Event Data along with coordinates code fix

2016-06-16 Thread Anilkumar Kodi
It got added when we are serializing and sending request in the executeAnonymousEventPush. On Thu, Jun 16, 2016 at 3:34 PM, Morten Olav Hansen wrote: > Right, but I don't see why you have valid in the payload to start with? > normal event export will not include this > > -- >

Re: [Dhis2-devs] Sync Anonymous Event Data along with coordinates code fix

2016-06-16 Thread Morten Olav Hansen
Right, but I don't see why you have valid in the payload to start with? normal event export will not include this -- Morten Olav Hansen Senior Engineer, DHIS 2 University of Oslo http://www.dhis2.org On Thu, Jun 16, 2016 at 4:52 PM, Anilkumar Kodi wrote: > Hi Morten

Re: [Dhis2-devs] Sync Anonymous Event Data along with coordinates code fix

2016-06-16 Thread Anilkumar Kodi
Hi Morten This is related to the coordinate value itself. Please see this event payload thats getting posted to /api/events (POST).

Re: [Dhis2-devs] Sync Anonymous Event Data along with coordinates code fix

2016-06-15 Thread Morten Olav Hansen
Hi Could you show me the payload you are sending? this API is in use by several clients without any issues. Also, it says `Unrecognized field "programInstance"` are you sure this is really related to `@JsonIgnore` on the `Coordinate` class? It would be easier to debug if you can share the event

Re: [Dhis2-devs] Sync Anonymous Event Data along with coordinates code fix

2016-06-15 Thread Anilkumar Kodi
Hi Morten, This is still looking for other 2 properties to map while deserializing, we are getting exception like com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "programInstance" (class org.hisp.dhis.dxf2.events.event.Event), not marked as ignorable (22

Re: [Dhis2-devs] Sync Anonymous Event Data along with coordinates code fix

2016-06-14 Thread Vanya Seth
Hi Morten That would be great. Please let us know when you commit the changes. We ll take a merge from the trunk. Regards Vanya On Wed, Jun 15, 2016 at 9:01 AM, Morten Olav Hansen wrote: > Hi > > We usually turn off most of that Jackson auto discovery magic, I see we >

Re: [Dhis2-devs] Sync Anonymous Event Data along with coordinates code fix

2016-06-14 Thread Morten Olav Hansen
Hi We usually turn off most of that Jackson auto discovery magic, I see we haven't done that properly in Jackson*, I will add that now (so it follows JacksonUtils, RenderService etc) -- Morten Olav Hansen Senior Engineer, DHIS 2 University of Oslo http://www.dhis2.org On Tue, Jun 14, 2016 at

[Dhis2-devs] Sync Anonymous Event Data along with coordinates code fix

2016-06-14 Thread Anilkumar Kodi
Hi Morten, We are doing Anonymous Event data push. As part of that we are also sending coordinates. Coordinate object has 4 public properties which are listed below @JsonProperty( required = true ) @JacksonXmlProperty( isAttribute = true ) public Double getLatitude() @JsonProperty( required =