• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why does Spring transactional method result in LazyInitializationException?  RSS feed

 
Nathan King
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The method below results in the org.hibernate.LazyInitializationException being thrown and I'd appreciate help in understanding why. I'm using JPA 2/Hibernate & Spring.

JPA 2/Hibernate are using the default transaction persistence context, therefore, shouldn't the method below allow for lazy loading?

Note: daoWrapper is a convenience class that wraps entity manager methods; the class itself is also annotated with @Transactional.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!