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

Exception with JSON serialization in ResponseBodyAdviceChain when debug logging is on [SPR-12616] #17217

Closed
spring-issuemaster opened this issue Jan 11, 2015 · 0 comments

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

commented Jan 11, 2015

Grigory Kislin opened SPR-12616 and commented

During serialization bean with lazy initialization hibernate collection I use https://github.com/FasterXML/jackson-datatype-hibernate (Hibernate4Module).

It works OK, but when I set debug logging level I have org.hibernate.LazyInitializationException' exception. Cannot evaluate ...
at line:

org/springframework/spring-webmvc/4.1.4.RELEASE/spring-webmvc-4.1.4.RELEASE
org/springframework/web/servlet/mvc/method/annotation/ResponseBodyAdviceChain.java:61

logger.debug("Invoking ResponseBodyAdvice chain for body=" + body);

Here it trying to make toString entity with lazy initialization.
As workaround I set in logging settings:
<logger name="org.springframework.web.servlet.mvc.method" level="INFO"/>


Affects: 4.1.4

Referenced from: commits f949b2d, cdaf449

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.