Error Rendering View: java.lang.IllegalStateException: duplicate Id for a component
kanna90 Oct 13, 2015 3:18 AMI am using JSF 1.2 Richfaces 3.3.0 and Facelets 1.1.15 with Tomcat 6.
My Server is Ubuntu 12.04.
Often I am getting exception as
Error Rendering View
java.lang.IllegalStateException: duplicate Id for a component.
I have more than 130 pages in my project. It occurs occasionally in other pages.
But I am getting often in two pages which has more number of calculations, `reRender` and more number of users use this two pages at a time (2 to 12 users at a time).
Default State saving method is server.
My jars:
JSF
1. jsf-api-1.2_12.jar
2. jsf-facelets-1.1.15.jar
3. jsf-impl-1.2_12.jar
Richfaces
4. richfaces-api-3.3.0.GA.jar
5. richfaces-impl-3.3.0.GA.jar
6. richfaces-ui-3.3.0.GA.jar
1. Referred
http://stackoverflow.com/questions/20543070/duplicate-component-id-found-in-view
and I added
<context-param>
<param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
<param-value>true</param-value>
</context-param>
2. Referred
and I had set unique id for all components explicitly in this two pages. In my project `binding` is used for only once for menu bar and the corresponding bean is request scoped.
Stack Trace :
duplicate Id for a component chgtype:porder
ava.lang.IllegalStateException: duplicate Id for a component chgtype:porder
at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:68)
at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:92)
at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:92)
at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:92)
at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:92)
at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:92)
at org.ajax4jsf.application.AjaxStateManager.getTreeStructureToSave(AjaxStateManager.java:187)
at org.ajax4jsf.application.AjaxStateManager.buildViewState(AjaxStateManager.java:473)
at org.ajax4jsf.application.AjaxStateManager.saveSerializedView(AjaxStateManager.java:426)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:617)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.systech.tradewinds.admin.bean.SessionFilter.doFilter(SessionFilter.java:66)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
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:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
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:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:745)
In component Tree : Same components with same id is duplicated.
<HtmlInputText disabled="true" id="porder" immediate="false" localValueSet="false" maxlength="-2147483648" readonly="false" rendered="true" required="false" size="-2147483648" styleClass="rsInput" transient="false" valid="true" value="SK15POR-2125"/>
<HtmlInputText disabled="true" id="porder" immediate="false" localValueSet="false" maxlength="-2147483648" readonly="false" rendered="true" required="false" size="-2147483648" styleClass="rsInput" transient="false" valid="true" value="SK15POR-2125"/>
Note :
1. This exception occurs for both explicitly set ids and for auto generated ids. This exception occurs with random ids. This exception occurs mostly in client machines(especially windows).
2. I have not used `<ui:repeat>` etc. I have used `<rich:dataTable>` mostly.
Help me to fix this issue.