javax.servlet.jsp.JspException: Exception thrown by getter for property booktype.name of bean bookinfo
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:897)
at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:233)
at org.apache.jsp.index_jsp._jspx_meth_bean_005fwrite_005f2(index_jsp.java:241)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:142)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
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.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1078)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:396)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:232)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
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:175)
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:844)
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:619)
排错原因:
经测试,在bootype.name取值时出错!这应该就是传说中的“lazyInitialization”!
解决方法:
可以在web.xml中配置一个openSesseionInViewFilter过滤器
配置如下:
<!-- 配置一个OpenSessionInViewFilter的过滤器,用于当用户请求带有延迟加载的数据时,解决lazyInitialization的问题 -->
<filter>
<filter-name>openSessionInViewFilter</filter-name>
<!-- 在referenced Libraries文件夹下的: spring-orm.jar-->
<filter-class>
org.springframework.orm.jdo.support.OpenPersistenceManagerInViewFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>openSessionInViewFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
果然,问题解决了!
分享到:
相关推荐
AlwaysRecreateHotregions="True" in WinForms templates or templates generated by Chart Builder causes the Exception Can't deserialize property. Unknown property name "AlwaysRecreateHotregions" in ...
- **Support for Spectrum Deregulation**: Several organizations, such as New America, the Center for Digital Democracy, and Free Press, have already thrown their support behind spectrum deregulation. ...
在Android应用开发中,NDK(Native Development Kit)是一个重要的工具集,它允许开发者使用C和C++编写部分代码,从而提升性能、处理底层硬件交互或利用现有的C/C++库。JNI(Java Native Interface)是Java平台的...
The most specific exception which can be thrown is written on the top in the catch block following by the less specific least. Nested try catch We can declare multiple try blocks inside the try ...
***IMPORTANT: Please remember do not install these components into a package by the name of either VCLZip or VCLUnZip. You will receive an error if you do. PLEASE TAKE A LOOK AT THE "WHAT's NEW IN ...
[http60-Processor3][org.apache.struts.action.RequestProcessor][WARN] - Unhandled Exception thrown: class org.hibernate.exception.JDBCConnectionException [http60-Processor1][org.hibernate.util....
the latch should not be returned to the queue as an exception will be thrown. Thanks to Bushov Alexander. For complete information on commons-pool, including instructions on how to submit bug ...
使用CDH来安装大数据组件的时候,当安装到YARN、Hbase、Spark的时候报错,主要原因是YARN、Hbase、Spark在HDFS里面没有权限去创建文件 Spark SecurityManager: authentication disabled; ui acls disabled;...
在使用SQL Server 2008执行大型SQL脚本文件时,可能会遇到“System.OutOfMemoryException”异常,这是由于计算机内存不足导致的。当SQL脚本文件过大,比如超过100M,就会造成内存压力,使得系统无法处理整个脚本。...
* An exception thrown by Flexihash. * * @author Paul Annesley * @license http://www.opensource.org/licenses/mit-license.php */ class Exception extends \Exception { }Hash...
SP-6992 : Prevent occasional exception being thrown when resolving dependencies on startup.
table += "<tr><th>ID</th><th>Name</th><th>Email</th></tr>"; for (var i = 0; i < data.length; i++) { var customer = data[i]; table += "<tr><td>" + customer.id + "</td><td>" + customer.username + ...
The format of the symbol name should be <PROJECT>_<PATH>_<FILE>_H_. To guarantee uniqueness, they should be based on the full path in a project's source tree. For example, the file foo/src/bar/baz.h...
throw new CustomException("A custom exception is thrown."); // 自定义异常 } } class CustomException extends Exception { public CustomException(String message) { super(message); } } ``` 在这个...
<add name="Documentation"/> ... </system.web> ``` 需要注意的是,这里的XML代码片段必须正确嵌入到`web.config`文件中,同时要确保所有标签的大小写正确无误。 #### 三、测试验证 完成上述配置更改后...
Any exception thrown during a database operation will be translated into a Spring DataAccessException, which provides a consistent error handling mechanism across different data access technologies. ...
Tape is a collection of queue-related classes for Android and Java. QueueFile is a lightning-fast, transactional, file-based FIFO. Addition and removal from an instance is an O(1) operation and is ...
<property name="messageConverters"> <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" /> </property> </bean> ``` 3. **创建Controller**: 创建一个...