[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - session.clear() effect to Proxy

JohnDoe2 do-not-reply at jboss.com
Mon Jun 4 04:50:06 EDT 2007


Hi,

we use the session.clear() method to avoid that the HibernateSession massive grows. With Hibernate 3.1 it works fine. After switching to Hibernate 3.2 we get the following Exception:

org.hibernate.LazyInitializationException: could not initialize proxy - no Session at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:57)
        at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111)
        at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:166)
        at com.xyz.hibernate.BillingItem_$$_javassist_168.getPrice(BillingItem_$$_javassist_168.java)


Is it a bug in 3.2 or is it so correct now and the 3.1 behaviour was wrong?

If i detach a persistent object from the session which effect has it to its proxys. In 3.1 it seems that the proxy will reattach automatically.


John.


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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050845



More information about the jboss-user mailing list