Just found the problem cause: what was not mentioned:
in the requests initiated by the remote divs the model is retrieved from session. For the model no hibernate session is attached, so non of the not already loaded lazy loading fields are available. Seems we have to: a) attach session manually (which means: action have knowledge about hibernate ... bad?) b) adding some service method which loads the field / collections explicitely c) some other? Thank you, Basti lbastil wrote: > > In our application we need to lazy load fields in the view. > > We have configured springs OpenSessionInViewFilter. > > If we use lazy loading from a normal JSP View, everything works fine. > > But on our View we also have AJAX tabbedpane with remote div's. > > Now the problem is: > within the content of this remote divs lazy loading is not possible for > us, > we receive: > > org.hibernate.LazyInitializationException: failed to lazily initialize a > collection of role: de.verwalt_berlin.senbjs.is > bj.portal.eud.model.Traeger.ansprechpartner, no session or session was > closed > at > org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentColl > ection.java:358) > at > org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(Abstract > PersistentCollection.java:350) > ... > > Do we have to configure something special in this case? > Do we have to manually open session again? > Is there some documentation about Open Session in View and AJAX? > Is it possible with ajaxed div's at all? > > Thank you in advance, > basti > -- View this message in context: http://www.nabble.com/-s2--Problems-with-lazy-loading-%28open-session-in-view-approach%29-tf4695942.html#a13423872 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]