2 Replies Latest reply on Feb 3, 2011 12:35 AM by Ilya Sorokoumov

    java.lang.IllegalStateException: duplicate Id for a component j_id_jsp_149784880_200:

    jayanth padmanabhan Newbie

      Hi,

          when i try to use HTML code within JSF i get the above error.

       

      But before i describe the error let me say that i have verified thoroughly and none of my components (JSF or Rich faces ) have a duplicate id. Each id in the jsf page is a unique id.

       

      my HTML code is as simple as follows:

       

                                      <table class="textcol">

                                      <tbody>

                                          <a4j:repeat value="#{bean.userFieldMap[lineModel.orderLine.autoId]}" var="userField" binding="#{bean.repeater}">       

                                          <tr>

                                          <td align="right">                                   

                                          <h:outputText styleClass="standard_bold" value="#{userField.fieldName}"/>

                                          <h:outputText styleClass="standard_bold" value=":"/>

                                          </td>       

                                          <td align="left">                           

                                              <h:outputText styleClass="standard_title" value="#{userField.fieldValue}" rendered="#{!bean.editMode}" />

                                              <h:inputText styleClass="standard_title" style="width:100%" value="#{userField.fieldValue}" rendered="#{bean.editMode}" >

                                              </h:inputText>

                                          </td>   

                                          </tr>

                                          </a4j:repeat>       

                                      </tbody>

                                    </table>

       

      i click on a button and a new page is getting rendered. But insstead of rendering the view, it shows the following error stack trace:

      I then have to click back to go to the previous page and then click on the button again to render the page 2nd time. This time it renderes correctly and does not show the error stack trace.

       

      when i remove the html code and use JSF, this error stack trace does not get shown.

       

      I am certain we can use htm ltags within JSF. Even the rich faces demo website shows html tags for a4j:repeat. So i cannot understand why i am getting this behaviour in my application.

       

      i am using

      RichFaces 3.3.1

      Tomahawk 1.1.5

       

      I am positive this is not a version problem because one of the previosu web app, i never got thsi behaviour even though it had html + jsf.

      But i am not clear as to what has changed.

       

       

       

      my goal is i have a collection and i want to iterate over it and display it in columns. Total there can be six columsn in a row

      sort of like:

       

      name1:value1                         name2:value2                    nam3:value3

      name4:vaue4                          name5:value5

       

      when i try to use h:dataGridwith columns="6" and then use the a4j:repeat within it , it just concatenetaes all the values in one column:

      like:

      name1:value1 name2:value2 nam3:value3

       

      that is why i want to use HTML tags but i get this weird IllegalStateException duplicate Id

       

      Please advise.

       

       

      16:55:54,565 WARN  [lifecycle] executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@1aff9e8) threw exception

      java.lang.IllegalStateException: duplicate Id for a component j_id_jsp_149784880_200:jaytable:j_id16

       

              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.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:498)

              at org.ajax4jsf.application.AjaxStateManager.saveView(AjaxStateManager.java:462)

              at com.sun.faces.application.ViewHandlerImpl$WriteBehindStateWriter.flushToWriter(ViewHandlerImpl.java:897)

              at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:184)

              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:106)

              at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)

              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)

              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)

              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:368)

              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

       

              at com.upnettec.gen2.security.ui.common.FeedbackFilter.doFilter(FeedbackFilter.java:50)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

       

              at com.upnettec.gen2.security.ui.common.Gen2SecurityFilter.doFilter(Gen2SecurityFilter.java:62)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

       

              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

              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:230)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)

              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)

              at java.lang.Thread.run(Thread.java:619)

      16:55:54,688 ERROR [BaseXMLFilter] Exception in the filter chain javax.servlet.ServletException: duplicate Id for a component j_id_jsp_149784880_200:jaytable:j_id16

              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)

              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:368)

              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

       

              at com.upnettec.gen2.security.ui.common.FeedbackFilter.doFilter(FeedbackFilter.java:50)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

       

              at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

       

              at com.upnettec.gen2.security.ui.common.Gen2SecurityFilter.doFilter(Gen2SecurityFilter.java:62)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

       

              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

              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:230)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)

              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)

              at java.lang.Thread.run(Thread.java:619)