getting the following exception:
org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed
i have a many-to-many mapping table
have tried out lazy="false" which gives this exception.
lazy="true" also doesnt works
m working on hibernate3..plz help
HSQL is
[junit] Hibernate: select loan0_.LOAN_ID as LOAN1_, loan0_.PROD_LINE_CD as PROD2_0_, loan0_.LOAN_NUM as LOAN3_0_, loan0_.PYMT_FRQNCY_TYP_CD as PYMT4_0_, loan0_.INTRST_CALC_MTHD_TYP_CD as INTRST5_0_, loan0_.LOAN_PRPS_CD as LOAN6_0_, loan0_.ACQSTN_TYP_CD as ACQSTN7_0_, loan0_.LOAN_TYP_CD as LOAN8_0_, loan0_.LOAN_STAT_CD as LOAN9_0_, loan0_.LOAN_ACQSTN_DT as LOAN10_0_, loan0_.ORIG_LOAN_BAL_AMT as ORIG11_0_, loan0_.ORIG_INTRST_RT_PCT as ORIG12_0_, loan0_.LOAN_TERM_NUM as LOAN13_0_, loan0_.AMORTZTN_SCHED_NUM as AMORTZTN14_0_, loan0_.SCHED_FRST_PYMT_DT as SCHED15_0_, loan0_.MATRTY_DT as MATRTY16_0_, loan0_.STAT_DT as STAT17_0_, loan0_.BYDWN_ORGNL_BAL_AMT as BYDWN18_0_, loan0_.ASSUM_IND as ASSUM19_0_, loan0_.ASSMPTN_DT as ASSMPTN20_0_, loan0_.MI_IND as MI21_0_, loan0_.BALLN_IND as BALLN22_0_, loan0_.BYDWN_IND as BYDWN23_0_, loan0_.CNCRRNT_LOAN_IND as CNCRRNT24_0_, loan0_.LOAN_FOCLSRE_IND as LOAN25_0_, loan0_.CONVRSN_IND as CONVRSN26_0_, loan0_.FHLMC_IND as FHLMC27_0_, loan0_.LATE_CHRG_IND
as LATE28_0_, loan0_.PREPMT_PNLTY_IND as PREPMT29_0_, loan0_.BRNCH_OFFC_ID as BRNCH30_0_, loan0_.PYMT_IN_FULL_DT as PYMT31_0_, loan0_.ORGNL_PI_AMT as ORGNL32_0_, loan0_.VERSION as VERSION0_, loan0_.CREATE_DT as CREATE34_0_, loan0_.CREATE_USER_ID as CREATE35_0_, loan0_.LAST_UPDATE_DT as LAST36_0_, loan0_.LAST_UPDATE_USER_ID as LAST37_0_ from LOAN loan0_ where (loan0_.LOAN_ID=? )
[junit] Hibernate: select loancustom0_.LOAN_ID as LOAN1_0_, loancustom0_.FOCLSRE_STOP_CD as FOCLSRE2_3_0_, loancustom0_.BNKRUPCY_CD as BNKRUPCY3_3_0_, loancustom0_.CSHIER_STOP_CD as CSHIER4_3_0_, loancustom0_.PROCSS_STOP_CD as PROCSS5_3_0_, loancustom0_.BAD_CHCK_STOP_IND as BAD6_3_0_, loancustom0_.BNKRUPCY_CHPTR_TYP_CD as BNKRUPCY7_3_0_, loancustom0_.PYMT_IN_FULL_STOP_CD as PYMT8_3_0_ from LOAN_CUSTOMER_CARE loancustom0_ where loancustom0_.LOAN_ID=?
[junit] Hibernate: select currentloa0_.LOAN_ID as LOAN1_0_, currentloa0_.NXT_PYMT_DUE_DT as NXT2_31_0_, currentloa0_.CRNT_PRCPL_BAL_AMT as CRNT3_31_0_ from CURRENT_LOAN_PAYMENT currentloa0_ where currentloa0_.LOAN_ID=?
[junit] Hibernate: select loanglb0_.LOAN_ID as LOAN1_0_, loanglb0_.GLB_NUM as GLB2_29_0_ from LOAN_GLB loanglb0_ where loanglb0_.LOAN_ID=?
[junit] Hibernate: select addresses0_.LOAN_ID as LOAN1_1_, addresses0_.PRPTY_ADDR_ID as PRPTY2_1_, address1_.ADDR_ID as ADDR1_0_, address1_.ADDR_LINE_1_TXT as ADDR2_4_0_, address1_.ADDR_LINE_2_TXT as ADDR3_4_0_, address1_.ADDR_LINE_3_TXT as ADDR4_4_0_, address1_.ADDR_CARR_RTE_CD as ADDR5_4_0_, address1_.POSTL_EXTNSN_CD as POSTL6_4_0_, address1_.POSTL_CD as POSTL7_4_0_, address1_.TRRTRY_CD as TRRTRY8_4_0_, address1_.CTY_CD as CTY9_4_0_, address1_.CITY_NAME as CITY10_4_0_, address1_.CNTY_CD as CNTY11_4_0_, address1_.ADDR_TYP_CD as ADDR12_4_0_, address1_.CNSUS_TRCT_ID as CNSUS13_4_0_, address1_.TX_JRSDCTN_ID as TX14_4_0_, address1_.FRGN_ADDR_IND as FRGN15_4_0_, address1_.VERSION as VERSION4_0_, address1_.CREATE_DT as CREATE17_4_0_, address1_.CREATE_USER_ID as CREATE18_4_0_, address1_.LAST_UPDATE_DT as LAST19_4_0_, address1_.LAST_UPDATE_USER_ID as LAST20_4_0_ from LOAN_PROPERTY addresses0_, ADDRESS address1_ where addresses0_.PRPTY_ADDR_ID=address1_.ADDR_ID and addresses0_.LOAN_ID=?
exception stacktrace
org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:53)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:84)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:134)
at com.amc.msr.tp3Engine.model.Territory$$EnhancerByCGLIB$$dc217e59.toString(<generated>)
at java.lang.String.valueOf(String.java:2177)
at java.lang.StringBuffer.append(StringBuffer.java:371)
at com.amc.msr.tp3Engine.dao.LoanDAOTestCase.testGetLoan(LoanDAOTestCase.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:325)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:536)
|