Problem: When lazy loading in used in Hibernate, it fails to initialize a collection of role.
failed to lazily initialize a collection of role: could not initialize proxy - no Session org.hibernate.LazyInitializationException: could not initialize proxy - no SessionCause: The session was closed, so it can't load the actual contents of the collection.
Solution: add an @Transactional annotation to it, or the entry point from which it is called.
No comments:
Post a Comment