Wrong serializer causing JsonMappingException
See original GitHub issueI’m using spring-data-rest (3.0.0), which uses jackson-databind 2.9.0.pr2. I’m not sure what have changed, since, not so long ago, I had an functional application. But now I’m getting:
"Could not write JSON document: java.lang.Double cannot be cast to java.lang.Integer (through reference chain: org.springframework.data.rest.webmvc.json.PersistentEntityJackson2Module$PersistentEntityResourceSerializer$1["content"]->**.Contrato["storageUtilizado"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: java.lang.Double cannot be cast to java.lang.Integer (through reference chain: org.springframework.data.rest.webmvc.json.PersistentEntityJackson2Module$PersistentEntityResourceSerializer$1["content"]->**.Contrato["storageUtilizado"])"
I’ve been stucked with this problem for a while and I’m just assuming that there is something wrong when de Serializer for this specific field is defined
I need, at least, some directions…
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (8 by maintainers)
Top GitHub Comments
@rafaelgondim Ok. Then that code has to be fixed. Thank you for reporting this; at least error messaging is now improved.
@rafaelgondim Thank you!