-->
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.  [ 3 posts ] 
Author Message
 Post subject: LazyInitializationException|no session or session was closed
PostPosted: Thu Oct 26, 2006 9:18 am 
Newbie

Joined: Fri Sep 22, 2006 5:16 am
Posts: 4
Location: Germany
Hi,

I'm runnig Hibernate 3.1 in a JSF Framework on Tomcat5.5.

Got 2 lazy loaded collections: containedPropertiesA, containedPropertiesB (Both have identical mappings)

My Problem is that after successfully fetching containedPropertiesA I want to fetch containedPropertiesB with the same session. While doing so hibernate crashes with:

Code:
ERROR [http-8880-Processor24] - failed to lazily initialize a collection of role: foo.bar.containedPropertiesB, no session or session was closed (LazyInitializationException.java:19)
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: foo.bar.containedPropertiesB, no session or session was closed
   at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
   at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
   at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
   at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
   at org.hibernate.collection.PersistentSet.toString(PersistentSet.java:253)


The thing I'm currently racking my brains on is, that at the point when hibernate calls the proxy for containedPropertiesB my Debuger tells me there is still a session that could be used für lazy loading.

Thanks for any help! If you need more information, just point out what you need.

_________________
Show me a sane man and I will cure him for you!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 26, 2006 9:45 am 
Expert
Expert

Joined: Tue Dec 07, 2004 6:57 am
Posts: 285
Location: Nürnberg, Germany
I think you are looking for this:

http://www.hibernate.org/43.html

_________________
Please don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 26, 2006 10:20 am 
Newbie

Joined: Fri Sep 22, 2006 5:16 am
Posts: 4
Location: Germany
@MikePloed: THX four your proposal but I already read

http://www.hibernate.org/42.html
http://www.hibernate.org/43.html

some others and googled for a while.

My symptoms look like I've got another error. Here is some additional Information:

1. I've got an running Interceptor for some month now
2. My page is not rendered when I call the Hibernate proxy
3. My Debugger says there is still an open session ?!?

_________________
Show me a sane man and I will cure him for you!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.