沉睡森林@漂在北京

本处文章除注明“转载”外均为原创,转载请注明出处。

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  152 随笔 :: 4 文章 :: 114 评论 :: 0 Trackbacks
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "name" with value "${sysUserinfo.username}": An error occurred while getting property "username" from an instance of class com.greatwall.module.yhqxgl.domain.SysUserinfo$$EnhancerByCGLIB$$b21cb1cc (org.hibernate.LazyInitializationException: could not initialize proxy - no Session)
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:236)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:257)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1183)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:902)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.servlet.ServletException: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "name" with value "${sysUserinfo.username}": An error occurred while getting property "username" from an instance of class com.greatwall.module.yhqxgl.domain.SysUserinfo$$EnhancerByCGLIB$$b21cb1cc (org.hibernate.LazyInitializationException: could not initialize proxy - no Session)
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
at org.apache.jsp.module.yhqxgl.sys_005fuserinfo.update_002dsys_005fuserinfo_jsp._jspService(update_002dsys_005fuserinfo_jsp.java:117)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
... 30 more
Caused by: org.hibernate.LazyInitializationException: could not initialize proxy - no Session
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:57)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150)
at com.greatwall.module.yhqxgl.domain.SysUserinfo$$EnhancerByCGLIB$$b21cb1cc.getUsername()
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:585)
at org.apache.taglibs.standard.lang.jstl.ArraySuffix.evaluate(ArraySuffix.java:278)
at org.apache.taglibs.standard.lang.jstl.ComplexValue.evaluate(ComplexValue.java:107)
at org.apache.taglibs.standard.lang.jstl.ELEvaluator.evaluate(ELEvaluator.java:204)
at org.apache.taglibs.standard.lang.jstl.ELEvaluator.evaluate(ELEvaluator.java:163)
at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:101)
at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:129)
at org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evaluate(ExpressionEvaluatorManager.java:75)
at com.greatwall.extjsptag.tags.form.TextTags.setName(TextTags.java:138)
at org.apache.jsp.module.yhqxgl.sys_005fuserinfo.update_002dsys_005fuserinfo_jsp._jspx_meth_gw_005ftext_005f0(update_002dsys_005fuserinfo_jsp.java:452)
at org.apache.jsp.module.yhqxgl.sys_005fuserinfo.update_002dsys_005fuserinfo_jsp._jspx_meth_gw_005fblock_005f0(update_002dsys_005fuserinfo_jsp.java:383)
at org.apache.jsp.module.yhqxgl.sys_005fuserinfo.update_002dsys_005fuserinfo_jsp._jspx_meth_gw_005fviewport_005f0(update_002dsys_005fuserinfo_jsp.java:328)
at org.apache.jsp.module.yhqxgl.sys_005fuserinfo.update_002dsys_005fuserinfo_jsp._jspx_meth_gw_005fbody_005f0(update_002dsys_005fuserinfo_jsp.java:291)
at org.apache.jsp.module.yhqxgl.sys_005fuserinfo.update_002dsys_005fuserinfo_jsp._jspx_meth_gw_005fhtml_005f0(update_002dsys_005fuserinfo_jsp.java:172)
at org.apache.jsp.module.yhqxgl.sys_005fuserinfo.update_002dsys_005fuserinfo_jsp._jspService(update_002dsys_005fuserinfo_jsp.java:108)
... 33 more
posted on 2009-05-22 16:27 王总兵 阅读(848) 评论(2)  编辑  收藏 所属分类: Spring

评论

# re: hibernate lazy load相关问题 2009-05-22 17:22 王兵
貌似发现在使用AnnotationSessionFactoryBean配置hibernate时
lazy=false无效了
总是延迟加载,利用OpenSessionInViewFilter时候也遇到问题
在返回json字符串时一直不能close session  回复  更多评论
  

# re: hibernate lazy load相关问题 2009-05-23 09:44 王兵
返回的json字符串出了问题 害我弄了半天OpenSessionInViewFilter  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: