Skip to content
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

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

Closed
spring-projects-issues opened this issue Feb 7, 2014 · 4 comments
Assignees
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues 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:

  • #16226 Poor jackson parsing error message in MappingJackson2HttpMessageConverter
  • #15886 MappingJackson2(Http)MessageConverter should be more verbose in canRead/canWrite checks (on Jackson 2.3)
  • #18735 MappingJackson2HttpMessageConverter should not always log a warning

1 votes, 3 watchers

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Feb 7, 2014

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

@spring-projects-issues spring-projects-issues commented Feb 7, 2014

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

@spring-projects-issues spring-projects-issues commented Feb 7, 2014

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

@spring-projects-issues spring-projects-issues commented Feb 7, 2014

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants