zagor
Sep 6th, 2007, 12:21 PM
I am getting the following error:
org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed
at org.hibernate.proxy.AbstractLazyInitializer.initia lize(AbstractLazyInitializer.java:53)
at org.hibernate.proxy.AbstractLazyInitializer.getImp lementation(AbstractLazyInitializer.java:80)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept (CGLIBLazyInitializer.java:133)
...
Even tho my .hbm.xml file has the lazy=false:
<many-to-one name="product" column="PRODUCT_MODEL_ID" class="com.xxx.xxx.dataobjects.ProductImpl" lazy="false" insert="false" update="false" cascade="all"/>
It works fine when the code runs within JBoss, but when running the code from TestNG it fails.
Anyone seen this before?
Thanks
org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed
at org.hibernate.proxy.AbstractLazyInitializer.initia lize(AbstractLazyInitializer.java:53)
at org.hibernate.proxy.AbstractLazyInitializer.getImp lementation(AbstractLazyInitializer.java:80)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept (CGLIBLazyInitializer.java:133)
...
Even tho my .hbm.xml file has the lazy=false:
<many-to-one name="product" column="PRODUCT_MODEL_ID" class="com.xxx.xxx.dataobjects.ProductImpl" lazy="false" insert="false" update="false" cascade="all"/>
It works fine when the code runs within JBoss, but when running the code from TestNG it fails.
Anyone seen this before?
Thanks