javax.faces.FacesException: Assertion Failed



我的登陆JSPO页面如下

<%-- jsf:pagecode language="java" location="/src/pagecode/view/common/AIRLandingPage.java" --%><%-- /jsf:pagecode --%><%@taglib
    uri="http://java.sun.com/portlet" prefix="portlet"%><%@taglib
    uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%><%@taglib
    uri="http://java.sun.com/jsf/core" prefix="f"%><%@page language="java"
    contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"
    session="false"%><portlet:defineObjects />
<f:view>
    <hx:scriptCollector id="scriptCollectorLandingPage"
        preRender="#{pc_AirLandingPage.onPageLoadBegin}">
        <f:subview id="subViewInitiator"
            rendered="#{pc_AirLandingPage.blnRenderInitiator}"><jsp:include
                page="AIRSearchViewForms.jsp" flush="false"></jsp:include></f:subview>

        <f:subview id="subViewMRORAssignee"
            rendered="#{pc_AirLandingPage.blnRenderMRORAssignee}"><jsp:include
                page="AIRSearchAssignee.jsp" flush="false"></jsp:include></f:subview>
    </hx:scriptCollector>
</f:view>

从其他页面加载此页面页面时出现以下错误。请帮忙。

[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R javax.faces.FacesException: Assertion Failed
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.sun.faces.util.Util.doAssert(Util.java:1353)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.sun.faces.taglib.jsf_core.ViewTag.getComponentType(ViewTag.java:245)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:1020)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java:1043)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:756)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:436)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:104)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm._jsp._AIRSearchViewForms._jspx_meth_f_view_0(_AIRSearchViewForms.java:4376)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm._jsp._AIRSearchViewForms._jspService(_AIRSearchViewForms.java:145)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1087)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:118)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:837)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:680)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:588)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:524)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:232)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:639)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1042)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1005)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm._jsp._AIRLandingPage._jspx_meth_f_subview_0(_AIRLandingPage.java:117)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm._jsp._AIRLandingPage._jspx_meth_f_view_0(_AIRLandingPage.java:170)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm._jsp._AIRLandingPage._jspService(_AIRLandingPage.java:88)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
[5/9/11 20:08:13:498 IST] 0000006c SystemErr     R  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1087)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:118)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:837)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:680)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:588)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:524)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:232)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:639)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.ws.portletcontainer.core.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:98)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.ws.portletcontainer.core.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:230)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.faces.portlet.httpbridge.PortletRequestDispatcherWrapper.include(PortletRequestDispatcherWrapper.java:61)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.faces.portlet.httpbridge.PortletRequestDispatcherWrapper.forward(PortletRequestDispatcherWrapper.java:35)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:325)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.faces.portlet.httpbridge.PortletExternalContextWrapper.dispatch(PortletExternalContextWrapper.java:90)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:257)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.faces.portlet.PortletViewHandlerImpl.renderView(PortletViewHandlerImpl.java:79)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:220)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:118)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.faces.portlet.FacesPortlet.doRender(FacesPortlet.java:372)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.faces.portlet.FacesPortlet.doView(FacesPortlet.java:413)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.assignmentinitrequestportlet.AssignmentInitRequestPortlet.doView(AssignmentInitRequestPortlet.java:91)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at com.ibm.faces.portlet.FacesPortlet.doDispatch(FacesPortlet.java:301)
[5/9/11 20:08:13:513 IST] 0000006c SystemErr     R  at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
javax.faces.FacesException: Assertion Failed
    at com.sun.faces.util.Util.doAssert(Util.java:1353)
    at com.sun.faces.taglib.jsf_core.ViewTag.getComponentType(ViewTag.java:245)

这表示您的<f:view>在包含页面中重复。这是非法的。整个 JSF 组件树只能有一个<f:view>并且可以有多个<f:subview>元素。<f:view>标记应位于母版页中,<f:subview>应位于包含页中。

重写母版页,如下所示:

<f:view>
    <hx:scriptCollector id="scriptCollectorLandingPage" preRender="#{pc_AirLandingPage.onPageLoadBegin}">
        <h:panelGroup rendered="#{pc_AirLandingPage.blnRenderInitiator}">
            <jsp:include page="AIRSearchViewForms.jsp" flush="false" />
        </h:panelGroup>
        <h:panelGroup rendered="#{pc_AirLandingPage.blnRenderMRORAssignee}">
            <jsp:include page="AIRSearchAssignee.jsp" flush="false" />
        </h:panelGroup>
    </hx:scriptCollector>
</f:view>

重写AIRSearchAssigneeAIRSearchAssignee JSP,如下所示:

<f:subview id="subViewInitiator">
    ... original content here, do NOT use f:view!
</f:subview>

<f:subview id="subViewMRORAssignee">
    ... original content here, do NOT use f:view!
</f:subview>

相关内容

  • 没有找到相关文章