﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-火柴天堂-随笔分类-错误</title><link>http://www.blogjava.net/burt/category/26527.html</link><description>热爱生活</description><language>zh-cn</language><lastBuildDate>Sun, 14 Oct 2007 09:29:33 GMT</lastBuildDate><pubDate>Sun, 14 Oct 2007 09:29:33 GMT</pubDate><ttl>60</ttl><item><title>无法读取外键表</title><link>http://www.blogjava.net/burt/archive/2007/10/14/152760.html</link><dc:creator>神的小火柴</dc:creator><author>神的小火柴</author><pubDate>Sun, 14 Oct 2007 09:19:00 GMT</pubDate><guid>http://www.blogjava.net/burt/archive/2007/10/14/152760.html</guid><wfw:comment>http://www.blogjava.net/burt/comments/152760.html</wfw:comment><comments>http://www.blogjava.net/burt/archive/2007/10/14/152760.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/burt/comments/commentRss/152760.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/burt/services/trackbacks/152760.html</trackback:ping><description><![CDATA[严重: Servlet.service() for servlet jsp threw exception<br />org.hibernate.LazyInitializationException: could not initialize proxy - no Session<br /><br />用hibernate的daosupporr继承类读取所有内容表，放到request中，jsp页面显示。<br />如果读取内容表外键关联的类别表的内容就出错。<br /><br />hibernate3 many-to-one的默认选项为lazy="proxy"<br /><br />把many-to-one或one-to-many的属性lazy改为lazy="false"<br /><br /><br /><img src ="http://www.blogjava.net/burt/aggbug/152760.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/burt/" target="_blank">神的小火柴</a> 2007-10-14 17:19 <a href="http://www.blogjava.net/burt/archive/2007/10/14/152760.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>