博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hibernate关联关系延时加载异常
阅读量:6583 次
发布时间:2019-06-24

本文共 33502 字,大约阅读时间需要 111 分钟。

hot3.png

最近在学习hibernate,记录一些初学者可能会碰到的问题及解决方案。

下面是我在注解配置了多对一关系(多个用户对应一个组织)后,查询用户列表时返回的报错页面。

原来注解 @ManyToOne() 中的参数 fetch 的默认值是 FetchType.LAZY ,就是默认延时加载关联属性,但是延时后session已关闭,所以会报错。

解决办法是将 fetch 设置为 FetchType.EAGER(EAGER : adj.渴望的; 热切的,热情洋溢的; 热心的; 急切; ),解决。

Struts Problem Report

Struts Problem Report

Struts has detected an unhandled exception:

Messages:
  1. could not initialize proxy - no Session

  2. java.lang.reflect.InvocationTargetException

  3. org.apache.struts2.json.JSONException: java.lang.reflect.InvocationTargetException

File: org/hibernate/proxy/AbstractLazyInitializer.java
Line number: 165

Stacktraces

org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: java.lang.reflect.InvocationTargetException

    org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:246)    org.apache.struts2.json.JSONWriter.processCustom(JSONWriter.java:178)    org.apache.struts2.json.JSONWriter.process(JSONWriter.java:168)    org.apache.struts2.json.JSONWriter.value(JSONWriter.java:134)    org.apache.struts2.json.JSONWriter.array(JSONWriter.java:481)    org.apache.struts2.json.JSONWriter.process(JSONWriter.java:158)    org.apache.struts2.json.JSONWriter.value(JSONWriter.java:134)    org.apache.struts2.json.JSONWriter.write(JSONWriter.java:102)    org.apache.struts2.json.JSONUtil.serialize(JSONUtil.java:107)    org.apache.struts2.json.JSONResult.createJSONString(JSONResult.java:203)    org.apache.struts2.json.JSONResult.execute(JSONResult.java:177)    com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:369)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:273)    org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)    org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:76)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:125)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:253)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)    org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564)    org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)    org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)    java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)    java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)    java.lang.Thread.run(Unknown Source)

org.apache.struts2.json.JSONException: java.lang.reflect.InvocationTargetException

    org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:246)    org.apache.struts2.json.JSONWriter.processCustom(JSONWriter.java:178)    org.apache.struts2.json.JSONWriter.process(JSONWriter.java:168)    org.apache.struts2.json.JSONWriter.value(JSONWriter.java:134)    org.apache.struts2.json.JSONWriter.add(JSONWriter.java:390)    org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:231)    org.apache.struts2.json.JSONWriter.processCustom(JSONWriter.java:178)    org.apache.struts2.json.JSONWriter.process(JSONWriter.java:168)    org.apache.struts2.json.JSONWriter.value(JSONWriter.java:134)    org.apache.struts2.json.JSONWriter.array(JSONWriter.java:481)    org.apache.struts2.json.JSONWriter.process(JSONWriter.java:158)    org.apache.struts2.json.JSONWriter.value(JSONWriter.java:134)    org.apache.struts2.json.JSONWriter.write(JSONWriter.java:102)    org.apache.struts2.json.JSONUtil.serialize(JSONUtil.java:107)    org.apache.struts2.json.JSONResult.createJSONString(JSONResult.java:203)    org.apache.struts2.json.JSONResult.execute(JSONResult.java:177)    com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:369)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:273)    org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)    org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:76)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:125)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:253)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)    org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564)    org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)    org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)    java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)    java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)    java.lang.Thread.run(Unknown Source)

java.lang.reflect.InvocationTargetException

    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)    java.lang.reflect.Method.invoke(Unknown Source)    org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:226)    org.apache.struts2.json.JSONWriter.processCustom(JSONWriter.java:178)    org.apache.struts2.json.JSONWriter.process(JSONWriter.java:168)    org.apache.struts2.json.JSONWriter.value(JSONWriter.java:134)    org.apache.struts2.json.JSONWriter.add(JSONWriter.java:390)    org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:231)    org.apache.struts2.json.JSONWriter.processCustom(JSONWriter.java:178)    org.apache.struts2.json.JSONWriter.process(JSONWriter.java:168)    org.apache.struts2.json.JSONWriter.value(JSONWriter.java:134)    org.apache.struts2.json.JSONWriter.array(JSONWriter.java:481)    org.apache.struts2.json.JSONWriter.process(JSONWriter.java:158)    org.apache.struts2.json.JSONWriter.value(JSONWriter.java:134)    org.apache.struts2.json.JSONWriter.write(JSONWriter.java:102)    org.apache.struts2.json.JSONUtil.serialize(JSONUtil.java:107)    org.apache.struts2.json.JSONResult.createJSONString(JSONResult.java:203)    org.apache.struts2.json.JSONResult.execute(JSONResult.java:177)    com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:369)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:273)    org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)    org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:76)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:125)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:253)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)    org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564)    org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)    org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)    java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)    java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)    java.lang.Thread.run(Unknown Source)

org.hibernate.LazyInitializationException: could not initialize proxy - no Session

    org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:165)    org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:286)    org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:185)    cn.clark.app.entity.OrganizationInfo_$$_jvst185_1.isEnabled(OrganizationInfo_$$_jvst185_1.java)    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)    java.lang.reflect.Method.invoke(Unknown Source)    org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:226)    org.apache.struts2.json.JSONWriter.processCustom(JSONWriter.java:178)    org.apache.struts2.json.JSONWriter.process(JSONWriter.java:168)    org.apache.struts2.json.JSONWriter.value(JSONWriter.java:134)    org.apache.struts2.json.JSONWriter.add(JSONWriter.java:390)    org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:231)    org.apache.struts2.json.JSONWriter.processCustom(JSONWriter.java:178)    org.apache.struts2.json.JSONWriter.process(JSONWriter.java:168)    org.apache.struts2.json.JSONWriter.value(JSONWriter.java:134)    org.apache.struts2.json.JSONWriter.array(JSONWriter.java:481)    org.apache.struts2.json.JSONWriter.process(JSONWriter.java:158)    org.apache.struts2.json.JSONWriter.value(JSONWriter.java:134)    org.apache.struts2.json.JSONWriter.write(JSONWriter.java:102)    org.apache.struts2.json.JSONUtil.serialize(JSONUtil.java:107)    org.apache.struts2.json.JSONResult.createJSONString(JSONResult.java:203)    org.apache.struts2.json.JSONResult.execute(JSONResult.java:177)    com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:369)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:273)    org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)    org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:76)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:125)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:253)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)    org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)    org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564)    org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)    org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)    java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)    java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)    java.lang.Thread.run(Unknown Source)

You are seeing this page because development mode is enabled.  Development mode, or devMode, enables extra debugging behaviors and reports to assist developers.  To disable this mode, set:

  struts.devMode=false

in your WEB-INF/classes/struts.properties file.

转载于:https://my.oschina.net/clark911/blog/490506

你可能感兴趣的文章
复杂recyclerView封装库
查看>>
使用Redis构建文章投票网站(Java)
查看>>
见微知著 —— Redis 字符串内部结构源码分析
查看>>
Command './js-ant' failed to execute
查看>>
阿里云NFS NAS数据保护实战
查看>>
Spring cloud配置客户端
查看>>
产品研发项目管理软件哪个好?
查看>>
【阿里云北京峰会】一图看懂机器学习PAI如何帮助企业应用智能化升级
查看>>
ansible playbook使用总结
查看>>
Android API中文文档(111) —— MailTo
查看>>
Linux 中如何卸载已安装的软件
查看>>
thinkphp 3.2 增加每页显示条数
查看>>
oracle日常简单数据备份与还原
查看>>
我的友情链接
查看>>
黑马程序员__反射总结
查看>>
Scala学习笔记(5)-类和方法
查看>>
Quartz原理
查看>>
完全卸载oracle|oracle卸载|彻底卸载oracle
查看>>
垃圾收集基础
查看>>
Docker安装及基本命令
查看>>