Tagged articles

open-in-view

1 articles · Page 1 of 1
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 25, 2026 · Backend Development

Four Ways to Fix Spring Boot JSON Serialization ‘no Session’ Error for Associated Entities

This article presents four practical solutions for the Spring Boot 3.5.0 “Could not write JSON: failed to lazily initialize a collection… no Session” error that occurs when serializing bidirectional one-to-many relationships, covering @JsonIgnore, JPQL fetch joins, enabling OpenEntityManagerInView, and using the Jackson Hibernate6 module, with code examples and results.

Spring Boothibernate6jackson
0 likes · 7 min read
Four Ways to Fix Spring Boot JSON Serialization ‘no Session’ Error for Associated Entities