-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Failed to lazily initialize a collection - no session or se
PostPosted: Thu Jan 20, 2005 10:46 am 
Newbie

Joined: Wed Nov 24, 2004 4:48 pm
Posts: 6
Hi there

I am getting this above mentioned exception regarding Lazy Initialize a collection.The mapping file has that entity marked as lazy=true.

We have a PersistenceFilter in WebDeployment descriptor for maintainig the session.

Please let me know what could be wrong.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 20, 2005 10:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Your session is closed before accessing the collection.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 20, 2005 10:57 am 
Newbie

Joined: Wed Nov 24, 2004 4:48 pm
Posts: 6
Thanks Mike

But could you tell me any work around for the same . I could see in my server logs that the SessionImpl.java is logging 'transaction completion' and 'disconnent session' before traversing to next page.

Could let me know if there is any work around for the same.I have JTA Tx enabled too in hibernate.cfg.xml


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 20, 2005 11:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Yes, there is a solution: Keep the session open or reattatch your objects.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 20, 2005 11:07 am 
Newbie

Joined: Wed Nov 24, 2004 4:48 pm
Posts: 6
Hi Mike
I am new in this.Could you pl. guide me how to do the same, either reattaching the Object OR force the session to be open.

I really appreciate ur help.
Please let me know.
Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 20, 2005 11:19 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
You could start by reading the documentation.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.