`
反求诸己
  • 浏览: 543402 次
  • 性别: Icon_minigender_1
  • 来自: 湖南娄底
社区版块
存档分类
最新评论

Exception thrown by getter for property booktype.name of bean bookinfo

阅读更多

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>

果然,问题解决了!

分享到:
评论

相关推荐

    Dundas.Chart.for.Winform.Enterprise.v7.1.0.1812.for.VS2008

    AlwaysRecreateHotregions="True" in WinForms templates or templates generated by Chart Builder causes the Exception Can't deserialize property. Unknown property name "AlwaysRecreateHotregions" in ...

    Power scaling for cognitive radio.pdf

    - **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开发互调示例demo

    在Android应用开发中,NDK(Native Development Kit)是一个重要的工具集,它允许开发者使用C和C++编写部分代码,从而提升性能、处理底层硬件交互或利用现有的C/C++库。JNI(Java Native Interface)是Java平台的...

    JSP Simple Examples

    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 ...

    VclZip pro v3.10.1

    ***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 ...

    Hibernate+c3p0连接池SQLServer 2000

    [http60-Processor3][org.apache.struts.action.RequestProcessor][WARN] - Unhandled Exception thrown: class org.hibernate.exception.JDBCConnectionException [http60-Processor1][org.hibernate.util....

    commons-dbcp-1.4-src&commons-pool-1.5.4-src

    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 安装 大数据组件 报错

    使用CDH来安装大数据组件的时候,当安装到YARN、Hbase、Spark的时候报错,主要原因是YARN、Hbase、Spark在HDFS里面没有权限去创建文件 Spark SecurityManager: authentication disabled; ui acls disabled;...

    SQL Server出现System.OutOfMemoryException异常的解决方法

    在使用SQL Server 2008执行大型SQL脚本文件时,可能会遇到“System.OutOfMemoryException”异常,这是由于计算机内存不足导致的。当SQL脚本文件过大,比如超过100M,就会造成内存压力,使得系统无法处理整个脚本。...

    一致性hash的PHP库.zip

     * An exception thrown by Flexihash.  *  * @author Paul Annesley  * @license http://www.opensource.org/licenses/mit-license.php  */ class Exception extends \Exception { }Hash...

    SQL Prompt_9.1.16.5356破解版

    SP-6992 : Prevent occasional exception being thrown when resolving dependencies on startup.

    javaweb 期末复习

    table += "&lt;tr&gt;&lt;th&gt;ID&lt;/th&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Email&lt;/th&gt;&lt;/tr&gt;"; for (var i = 0; i &lt; data.length; i++) { var customer = data[i]; table += "&lt;tr&gt;&lt;td&gt;" + customer.id + "&lt;/td&gt;&lt;td&gt;" + customer.username + ...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    The format of the symbol name should be &lt;PROJECT&gt;_&lt;PATH&gt;_&lt;FILE&gt;_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...

    javaException_JAVA源码_

    throw new CustomException("A custom exception is thrown."); // 自定义异常 } } class CustomException extends Exception { public CustomException(String message) { super(message); } } ``` 在这个...

    webservice调用常见问题

    &lt;add name="Documentation"/&gt; ... &lt;/system.web&gt; ``` 需要注意的是,这里的XML代码片段必须正确嵌入到`web.config`文件中,同时要确保所有标签的大小写正确无误。 #### 三、测试验证 完成上述配置更改后...

    Spring和Mybatis整合英文文档翻译.pdf

    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. ...

    Android代码-tape

    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 ...

    springmvc的ajax配置,实现

    &lt;property name="messageConverters"&gt; &lt;bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" /&gt; &lt;/property&gt; &lt;/bean&gt; ``` 3. **创建Controller**: 创建一个...

Global site tag (gtag.js) - Google Analytics