Actually, while you can change your mapping to eager, that is not the best way or the best approach. Eager fetching should be set at query time, never in mapping. If you put it in mapping you will get rid of any LazyInitializationException, but you will slow down your use cases that don't need all that data. You would be getting too much data from the database and have to trasnfer all that data on the wire when that particular use case might not need it.
Fetch mode should always be a query time thing.
LazyInitializationException occurs when you haven't fetched all the data you need and you close the Session and then try to access that data not fetched. Since Hibernate will have proxies for that data, then it will try to connect to the database but since there is no Session there is no Connection to the database to get that other data.
Also, this is a Hibernate question, not a Spring question so should have been posted in the ORM forum.
Sorry, I deleted your other thread about Open Session In View. While that also would work, you are still adding patches to the actual problem of not getting exactly the amount of data your use case needs at the time of query and waiting till the jsp page to do more querying.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: spring hinbernet integration session problem