[jboss-user] [EJB/JBoss] - org.hibernate.LazyInitializationException
veeseekay
do-not-reply at jboss.com
Wed Jul 25 05:01:03 EDT 2007
guys, am facing an issue while trying to lazy load certain entities withing a multithreaded enviornment.
here s my scenario :
Class Outer {
//Am using jboss rules session
private rulesSession;
private class Inner implements Runnable {
run() {
}
private lazyLoadEntites() {
// this is where I get the damn exception
}
private assertToSession() {
rulesSession.assert(something);
}
}
method() {
// this creates multiple threads to do some job in parallel
// am using executors, and am executing run() of inner class
}
}
and here s my exception
13:50:48,462 ERROR [LazyInitializationException] failed to lazily initialize a collection of role:no session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: no session or session was closed
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:3
at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
F1 please!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067334#4067334
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067334
More information about the jboss-user
mailing list