Skip to content

Log caught exception in MappingJackson2HttpMessageConverter [SPR-11403] #16030

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Feb 7, 2014 · 4 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Feb 7, 2014

Oliver Drotbohm opened SPR-11403 and commented

#15886 introduced more detailed log output for MappingJackson2HttpMessageConverter in case of an invalid mapping configuration. However, the log output only states "Failed to evaluate deserialization for type: Foo" which is not too helpful, as you don't find out about the details of the invalid mapping of said class.

It would be helpful to also log the cause as it contains detailed information about what actually is misconfigured.


Affects: 4.0.1

Issue Links:

1 votes, 3 watchers

@spring-projects-issues
Copy link
Collaborator Author

Johannes Hiemer commented

I need to agree here. Switching to 4.0.1 made it a lot easier to debug at all, but it would be very nice if one could see the the log which is visible when stepping into the canRead implementation.

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Seems we simply missed to log the cause there! That's indeed a bug...

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Fixed through appending the toString'ed exception at the existing warn level message, and logging the full stacktrace in case of debug level being enabled.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Johannes Hiemer commented

Thanks a lot for the quick response! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants