Ismar Slomic
05-14-2007, 10:16 AM
I'm using NHibernate with Spring in the web application. I get this exception when i try to persist a object (after the page is loaded for first time):
Could not initialize proxy - the owning Session was closed.
Exception Details: NHibernate.LazyInitializationException: Could not initialize proxy - the owning Session was closed.
After doing some researches on this forum and reading the article http://www.hibernate.org/43.html
I realize that this is a common issue on web-apps. As I understood i need to open session in view. Im using a three-tier approach and my configuration is very similar to Northwind example.
I would appriciate if someone could explain in details how I can fix this.
Tnx in advance,
Ismar
Could not initialize proxy - the owning Session was closed.
Exception Details: NHibernate.LazyInitializationException: Could not initialize proxy - the owning Session was closed.
After doing some researches on this forum and reading the article http://www.hibernate.org/43.html
I realize that this is a common issue on web-apps. As I understood i need to open session in view. Im using a three-tier approach and my configuration is very similar to Northwind example.
I would appriciate if someone could explain in details how I can fix this.
Tnx in advance,
Ismar