嚴重: Servlet.service() for servlet jsp threw exception
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
用hibernate的daosupporr繼承類讀取所有內容表,放到request中,jsp頁面顯示。
如果讀取內容表外鍵關聯的類別表的內容就出錯。
hibernate3 many-to-one的默認選項為lazy="proxy"
把many-to-one或one-to-many的屬性lazy改為lazy="false"
posted on 2007-10-14 17:19
神的小火柴 閱讀(286)
評論(0) 編輯 收藏 所屬分類:
錯誤