The most common reason for a LazyInitializationException (and 3 solutions!) | Lazy Loading In Hibernate


#1

In this episode you will learn how to manually trigger a LazyInitializationException, by trying to access Hibernate objects AFTER you closed the database connection. Then afterwards, we are going to look at three solutions to fix the exception, each with its own advantages and disadvantages.


This is a companion discussion topic for the original entry at https://www.marcobehler.com/episodes/57-the-most-common-reason-for-a-lazyinitializationexception-and-3-solutions