File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: org.hibernate.LazyInitializationException