0

我正在使用 EJB 3.0 + JPA 2.0 + PrimeFaces 3.2 + JSF 2.0。当我在每个页面中重复相同的代码时,我的应用程序中的导航非常棒,没有任何问题。当我template.xhtml用作母版页以便相同的代码适用于所有页面时,会出现一条错误消息:

javax.servlet.ServletException:尝试从 clientId 'j_idt36:j_idt38:j_id2' 中提取 rowIndex 对于输入字符串:“j_idt38”

此链接会在出现错误消息时向您显示:http ://www.youtube.com/watch?v=rR6CqwBREpM

template.xhtml代码 :

<h:head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <script>
        window.history.forward();
    </script>
    <ui:insert name="title">
    </ui:insert>
    <link href="#{facesContext.externalContext.requestContextPath}/resources/css/cssLayout.css" rel="stylesheet" type="text/css"/>
</h:head>

<h:body>
    <f:view locale="#{langueApp.localeCode}">
        <p:layout fullPage="true">
            <p:layoutUnit position="north" size="100" header="#{bundle.header}" resizable="true" closable="false" collapsible="true">
                <ui:include src="template/header.xhtml"/>
            </p:layoutUnit>

            <p:layoutUnit position="west" size="300" resizable="true"  collapsible="true" header="#{bundle.me}" minSize="200">
                <ui:include src="template/dynamicmenu.xhtml"/>
            </p:layoutUnit>

            <ui:insert name="content">

            </ui:insert>

            <p:layoutUnit position="south" size="0" style="text-align: center;" header="#{bundle.footer}" resizable="false" closable="false" collapsible="false" >
                <ui:include src="template/footer.xhtml"/>
            </p:layoutUnit> 
        </p:layout>
    </f:view>
</h:body>

堆栈跟踪:

Avertissement: PWC4011: Unable to set request character encoding to UTF-8 from context /ProjetIset2, because request parameters have already been read, or ServletRequest.getReader() has already been called
Avertissement: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NumberFormatException: Trying to extract rowIndex from clientId 'j_idt36:j_idt38:j_id2' For input string: "j_idt38"
    at javax.faces.component.UIData.invokeOnComponent(UIData.java:1006)
    at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1403)
    at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:669)
    at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1403)
    at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:669)
    at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1403)
    at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:669)
    at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1403)
    at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:669)
    at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1403)
    at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:669)
    at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:305)
    at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:188)
    at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123)
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:452)
    at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:148)
    at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:303)
    at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:192)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
    at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:722)
4

1 回答 1

2

我认为这是 Mojarra 实现中的一个错误。我追查到代码中的错误并触发了一个错误:http: //java.net/jira/browse/JAVASERVERFACES-2623

于 2012-12-05T00:40:07.820 回答