question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong serializer causing JsonMappingException

See original GitHub issue

I’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

Degub_Print

I need, at least, some directions…

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
cowtowncodercommented, May 4, 2017

@rafaelgondim Ok. Then that code has to be fixed. Thank you for reporting this; at least error messaging is now improved.

1reaction
cowtowncodercommented, Apr 27, 2017

@rafaelgondim Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

JsonMappingException while try to deserialize object with null ...
Question: How to avoid this exception or to pledge Jackson ignore null-values during serialization? Throws: Message: com.fasterxml.jackson.databind.
Read more >
Jackson Exceptions - Problems and Solutions - Baeldung
The most common Jackson exceptions - the cause of the problem and the solution for ... JsonMappingException: No Serializer Found for Class ......
Read more >
Process plan JSON isn't serialized properly due to infinite ...
Setting a script of output type String to something other than a string can cause infinite recursion in serialization (we've seen this with...
Read more >
Confluent 3.0 quick start -- get error when trying to send ...
SerializationException: Error serializing Avro message Caused by: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input ...
Read more >
Automation for Jira rules fail with the exception "No serializer ...
IssueBeanTransformer] Error transforming issue with key 'PROJ-100' to automation ... JsonMappingException: No serializer found for class ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found