3

嗨,我已经将我的配置和库升级到了休眠 4 spring 3.1.1 richfaces 4 .... 我在 tomcat 7 上运行。但是当我尝试打开我的索引页面时,服务器运行一个循环。当我尝试在“ViewHandlerResponseWrapper”中设置断点时,eclipse卡住了,我无法调试它以找到原因。并且“HttpServletResponseWrapper”的来源似乎不可用。循环的异常如下所示:

    Apr 05, 2012 9:21:56 AM org.apache.catalina.core.ApplicationDispatcher invoke
    Schwerwiegend: Servlet.service() for servlet Faces Servlet threw exception
    java.lang.StackOverflowError
        at javax.servlet.http.HttpServletResponseWrapper.setStatus(HttpServletResponseWrapper.java:201)
        at javax.servlet.http.HttpServletResponseWrapper.setStatus(HttpServletResponseWrapper.java:201)
        at com.sun.faces.application.ViewHandlerResponseWrapper.setStatus(ViewHandlerResponseWrapper.java:88)
        at javax.servlet.http.HttpServletResponseWrapper.setStatus(HttpServletResponseWrapper.java:201)
        at javax.servlet.http.HttpServletResponseWrapper.setStatus(HttpServletResponseWrapper.java:201)
        at com.sun.faces.application.ViewHandlerResponseWrapper.setStatus(ViewHandlerResponseWrapper.java:88)
        at javax.servlet.http.HttpServletResponseWrapper.setStatus(HttpServletResponseWrapper.java:201)
        at javax.servlet.http.HttpServletResponseWrapper.setStatus(HttpServletResponseWrapper.java:201)
        at com.sun.faces.application.ViewHandlerResponseWrapper.setStatus(ViewHandlerResponseWrapper.java:88)
        at javax.servlet.http.HttpServletResponseWrapper.setStatus(HttpServletResponseWrapper.java:201)
        at javax.servlet.http.HttpServletResponseWrapper.setStatus(HttpServletResponseWrapper.java:201)
        at com.sun.faces.application.ViewHandlerResponseWrapper.setStatus(ViewHandlerResponseWrapper.java:88)
        at javax.servlet.http.HttpServletResponseWrapper.setStatus(HttpServletResponseWrapper.java:201)
        at javax.servlet.http.HttpServletResponseWrapper.setStatus(HttpServletResponseWrapper.java:201)
        at com.sun.faces.application.ViewHandlerResponseWrapper.setStatus(ViewHandlerResponseWrapper.java:88)
        at javax.servlet.http.HttpServletResponseWrapper.setStatus(HttpServletResponseWrapper.java:201)
        at javax.servlet.http.HttpServletResponseWrapper.setStatus(HttpServletResponseWrapper.java:201)
... and so on

希望有人可以帮助我。谢谢

4

1 回答 1

7

好的,我自己找到了它:我必须从以下位置升级我的 faces-config.xml 的标头:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
                              "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>

<?xml version="1.0" encoding="UTF-8"?>
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
    version="2.0">
于 2012-04-05T07:57:19.777 回答