These are chat archives for spring-cloud/spring-cloud

21st
Jan 2016
Dreampie
@Dreampie
Jan 21 2016 04:13

spring-cloud/spring-cloud-netflix#782 feign client return Page error:

Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of org.springframework.data.domain.Page, problem: abstract types either need to be mapped to concrete types, have custom deserializer, or be instantiated with additional type information
at [Source: java.io.PushbackInputStream@67635da8; line: 1, column: 1]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148) ~[jackson-databind-2.6.4.jar:2.6.4]
at com.fasterxml.jackson.databind.DeserializationContext.instantiationException(DeserializationContext.java:892) ~[jackson-databind-2.6.4.jar:2.6.4]
at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserialize(AbstractDeserializer.java:139) ~[jackson-databind-2.6.4.jar:2.6.4]
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3736) ~[jackson-databind-2.6.4.jar:2.6.4]
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2810) ~[jackson-databind-2.6.4.jar:2.6.4]
at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:221) ~[spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]
... 30 common frames omitted

Spencer Gibb
@spencergibb
Jan 21 2016 04:28
It's an open issue that isn't supported yet.
Dave Syer
@dsyer
Jan 21 2016 10:17
@mbenson that looks like a bug in Spring to me (the hander is mapped, but cannot be executed at runtime)
Dave Syer
@dsyer
Jan 21 2016 11:08
But if you want a workaround I'd say you don't need proxies
You just need a custom HandlerMethodArgumentResolver
Matt Benson
@mbenson
Jan 21 2016 15:27
@dsyer: I will look into that. The proxy approach was a non starter, certainly