Use the proper ORM annotations (@ManyToOne and @OneToMany).
Use eager fetch (fetch = FetchType.EAGER) annotation.
You have a different solution? A short tip here would help you and many other users who saw this issue last week.
- org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: contacts.resources.Category.subcategory, could not initialize proxy - no Session at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:575)