• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

OpenSessionInViewFilter closes session during view loading (Spring+Hibernate)  RSS feed

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I'm developing an application using Spring 2.5 and Hibernate 3. I've configured the opensessioninviewfilter interceptor and changed all the relations to Lazy. As I understand it the interceptor should keep the Hibernate session open until the html rendering is done, but in the jsp's if I try to load a property through an object relation I get this error: "org.hibernate.LazyInitializationException: could not initialize proxy - no Session".

The code I have in the web.xml file is:


Anybody chas any idea why this isn't working?
Thanks a lot!
 
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have any other filters defined?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!