Skip to content

YammerThreadStatsMixin json property #3

Closed
satishpandey opened this Issue Apr 19, 2012 · 2 comments

2 participants

@satishpandey

Status updates are throwing exceptions:

org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: Unrecognized field "shares" (Class org.springframework.social.yammer.api
.YammerThread$ThreadStats), not marked as ignorable
at Source: org.apache.http.conn.EofSensorInputStream@161f888; line: 1, column: 1193; nested exception is org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "shares" (Class org.springframework.social.yamme
r.api.YammerThread$ThreadStats), not marked as ignorable
at Source: org.apache.http.conn.EofSensorInputStream@161f888; line: 1, column: 1193
at org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.readInternal(MappingJacksonHttpMessageConverter.java:127)
at org.springframework.http.converter.AbstractHttpMessageConverter.read(AbstractHttpMessageConverter.java:153)
at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:81)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:446)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:415)
at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:294)
at org.springframework.social.yammer.api.impl.MessageTemplate.postUpdate(MessageTemplate.java:97)
at org.springframework.social.yammer.api.impl.MessageTemplate.postUpdate(MessageTemplate.java:90)


We need to include
@JsonIgnoreProperties(ignoreUnknown=true)

above
abstract static class YammerThreadStatsMixin

please check-in a new class including ignore property.

Thank You
Satish Pandey

@magott
Owner
magott commented Apr 19, 2012

I'll have a look at it, might be better to map the missing field than to ignore it. Will redo the build setup to allign with spring-social as well soon, will do it then.

@magott magott closed this in d6264fd Apr 19, 2012
@satishpandey

Thank You Magott

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.