• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

could not initialize proxy - the owning Session was closed

 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use hibernat template to execute the following code


When the following line



is executed I get the following error.

org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed


My config files are as follows:


Location.hbm.xml




Event.hbm.xml



By any chance is the following line

closing the session. If you look at the config files, i have not defined any association, so lazy loading is not in picture. I am not able to understand why i get this error.
Can some help to understand the concept.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic