I get this exception when I try to request collection of related entities 
(using EJB3 relations). When I try to access from local client (session bean) 
everything is ok. But when I try to access from remote client I get the 
exception... 

Exception in thread "main" org.hibernate.LazyInitializationException: failed to 
lazily initialize a collection of role: my.Entity1.relatedCollection, 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.readSize(AbstractPersistentCollection.java:97)
  |     at org.hibernate.collection.PersistentBag.size(PersistentBag.java:222)
  |     at my.TestClient.main(TestClient.java:31)

Is it possible to access to the collection from remote client at all?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969370#3969370

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969370
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to