java.lang.NumberFormatException: Trying to extract rowIndex from clientId 'j_idt36:j_idt38:j_id2' For input string: “j_idt38”

守給你的承諾、 提交于 2019-12-12 03:13:02

问题


I am using EJB 3.0 + JPA 2.0 + PrimeFaces 3.2 + JSF 2.0. The navigation in my application was great with no problems when I repeated the same code in every page. When I template.xhtml I used as a master page so that the same code applies to all pages, an error message comes:

javax.servlet.ServletException: Trying to extract rowIndex from clientId 'j_idt36:j_idt38:j_id2' For input string: "j_idt38"

This link show you when the error message rises: http://www.youtube.com/watch?v=rR6CqwBREpM

template.xhtml code :

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

the stack trace :

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)

回答1:


I think this is a bug in Mojarra implementation. I traced down to the error in code and fired a bug: http://java.net/jira/browse/JAVASERVERFACES-2623



来源:https://stackoverflow.com/questions/10717753/java-lang-numberformatexception-trying-to-extract-rowindex-from-clientid-j-idt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!