Monday 28 September 2015

org.hibernate.LazyInitializationException: could not initialize proxy - no Session

Answer : Add this line in your configuration file.

<property name="hibernate.enable_lazy_load_no_trans">true</property>

This will initialize your proxy object at run time after closing session, even you are using FetchType.LAZY in hibernate entity class.


No comments:

Post a Comment