aspose file tools*
The moose likes Object Relational Mapping and the fly likes org.hibernate.LazyInitializationException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "org.hibernate.LazyInitializationException" Watch "org.hibernate.LazyInitializationException" New topic
Author

org.hibernate.LazyInitializationException

Naufal kurudamparambil
Greenhorn

Joined: Jan 03, 2012
Posts: 4
Hi
I am making one web application using struts 1.3 and hibernate I have changed not-null="false" in One to many relation in one class's hbm file, after that i got exception org.hibernate.LazyInitializationException

Regards
Naufal
Claudiu Chelemen
Ranch Hand

Joined: Mar 25, 2011
Posts: 71

By default, hibernate uses lazy initialization.
Try adding lazy="false" to class declaration and check if it works.
If not, please post your mappings.

Cheers,
Claudiu
 
 
subject: org.hibernate.LazyInitializationException