Hibernate version: 2.1.4
Hello,
I have an app where I see the following error every once in a while:
Code:
2004-11-19 16:01:45,359 FATAL [ ajp-3] ErrLog Failed to lazily initialize a collection - no session or session was closed
net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection - no session or session was closed
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:209)
at net.sf.hibernate.collection.PersistentCollection.write(PersistentCollection.java:84)
at net.sf.hibernate.collection.Bag.add(Bag.java:281)
...
...
2004-11-19 16:01:45,360 FATAL [ ajp-3] ErrLog HIBERNATE SESSION: net.sf.hibernate.impl.SessionImpl@126078f
2004-11-19 16:01:45,360 FATAL [ ajp-3] ErrLog HIBERNATE SESSION IS CONNECTED: true
The last part above is from my app - my attempt to see what state the Hibernate Session is in. And this is where I see a conflict. Hibernate is saying that it either has no Session, or that the Session was closed. However, you can see from the above that the Session instance _does_ exist, and it is even connected to the DB (can it be connected but closed somehow?)
This happens so sporadically, so randomly, I don't know how to trace the source of the problem.
Is there something else I can dump or log on the Hibernate level that would let me peek inside Hibernate and see what is going on with the Session in question?
Thanks,
Otis