com.sun.jdi.InvocationException occurred invoking

调试时候出现com.sun.jdi.InvocationException occurred invoking method

原因:因为hibernate的延迟加载引起

修改:修改hbm映射文件的对象映射lazy="false"

在web.xml中添加过滤器

<!-- 配置过滤器,解决hibernate的延迟加载问题 -->
 <filter>
  <filter-name>openSession</filter-name>
  <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
 </filter>
 <filter-mapping>
  <filter-name>openSession</filter-name>
  <url-pattern>/*</url-pattern>
 </filter-mapping>

posted on 2016-11-14 21:26  摇曳蒲公英  阅读(681)  评论(0编辑  收藏  举报

导航