Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

org.hibernate.LazyInitializationException

 
Naufal kurudamparambil
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 75
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic