1 2 Previous Next 16 Replies Latest reply on Jun 30, 2009 12:47 PM by Robert Morse

    Seam 2.1.0SP1 bug: duplicate Id for a component, bad jsf-facelets.jar

    Francisco Jose Peredo Noguez Master

      I upgraded from Seam 2.0.2SP1 in to 2.1.0SP1  and now I am getting duplicate Id for a component errors (this works fine in 2.0.2SP1, I have 2 rich trees with outputlinks inside them):


      java.lang.IllegalStateException: duplicate Id for a component formMenuDinamico:menuDinamico:j_id13
           at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:50)
           at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72)
           at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72)
           at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72)
           at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72)
           at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72)
           at org.ajax4jsf.application.AjaxStateManager.getTreeStructureToSave(AjaxStateManager.java:188)
           at org.ajax4jsf.application.AjaxStateManager.buildViewState(AjaxStateManager.java:469)
           at org.ajax4jsf.application.AjaxStateManager$SeamStateManagerWrapper.saveView(AjaxStateManager.java:106)
           at org.jboss.seam.jsf.SeamStateManager.saveView(SeamStateManager.java:89)
           at org.ajax4jsf.application.AjaxStateManager.saveSerializedView(AjaxStateManager.java:430)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:615)
           at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
           at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:196)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
           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.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:51)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:42)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
           at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
           at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
           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:286)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
           at java.lang.Thread.run(Thread.java:595)
      
      



      So I started reverting my .jar files until I isolated the bad .jar: jsf-facelets.jar, if I use Seam 2.1.0SP1 but I use the file that came with 2.0.2SP1 everything works fine.


      The version of jsf-facelets.jar that works fine is 1.1.14, the one that fails is 1.1.15.B1.


      So, I decided i am going to use 2.1.0SP1 but I am going to keep my 1.1.14 jsf-facelets.jar.  Will I see any limitation in functionality? Has anyone else encountered this issue?


      Thanks,


      Regards,


        • 1. Re: Seam 2.1.0SP1 bug: duplicate Id for a component, bad jsf-facelets.jar
          Francisco Jose Peredo Noguez Master

          I am starting to think that the version number 1.1.15.B1 of the new jsf-facelets.jar file is a little suspicious (specially the B1 ending, it look like BETA1 to me). Maybe that is why it is giving me problems?

          • 2. Re: Seam 2.1.0SP1 bug: duplicate Id for a component, bad jsf-facelets.jar
            Francisco Jose Peredo Noguez Master

            In the Facelets Main Site the latest release is still 1.1.14.


            Should I request in JIRA to go back to 1.1.14 since it is the latest stable released version?

            • 5. Re: Seam 2.1.0SP1 bug: duplicate Id for a component, bad jsf-facelets.jar
              Robert Morse Apprentice

              Ran into the same issue.  Replacing with facelets 1.1.14 fixed it.

              • 6. Re: Seam 2.1.0SP1 bug: duplicate Id for a component, bad jsf-facelets.jar
                Robert Morse Apprentice

                I attempted to move my ear to JBoss 5.1.0.GA and started getting NPE.  Tracking it down, turns out that 5.1.0.GA requires 1.1.15.B1.   So I switched, and now have the duplicate id issue as described by Francisco.  Guess I'm back to 4.2.3.GA.  Any suggestions as to the root cause of this? 

                • 8. Re: Seam 2.1.0SP1 bug: duplicate Id for a component, bad jsf-facelets.jar
                  Robert Morse Apprentice

                  Sure!  I appreciate you taking the time to look at this.  It appears to be related only to the rich:tree component.  I replaced it (functionally) with rich:dropDownMenu and there's no issue.  Below is the xhtml code for the tree, and the associated exception.




                  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                       xmlns:s="http://jboss.com/products/seam/taglib"
                       xmlns:ui="http://java.sun.com/jsf/facelets"
                       xmlns:f="http://java.sun.com/jsf/core"
                       xmlns:h="http://java.sun.com/jsf/html"
                       xmlns:a="https://ajax4jsf.dev.java.net/ajax"
                       xmlns:a4j="http://richfaces.org/a4j"
                       xmlns:rich="http://richfaces.org/rich"
                       xmlns:cdm="http://gwl.com/products/im/cdm">
                  
                       <s:div styleClass="box">
                            <div class="mainMenuContainer"><rich:panel
                                 rendered="#{currentUser.activated}">
                                 <h:form id="navigationForm" styleClass="box">
                                      <div class="form"><rich:tree switchType="ajax"
                                           binding="#{navTree.htmlTree}">
                                           <rich:recursiveTreeNodesAdaptor var="dt" roots="#{docTree.root}"
                                                nodes="#{dt.children}">
                  
                                                <rich:treeNode>
                                                     <f:facet name="icon">
                                                          <h:graphicImage value="#{imagePath}/icon.dir.gif" width="18"
                                                               height="20" />
                                                     </f:facet>
                                                     <f:facet name="iconLeaf">
                                                          <h:graphicImage value="#{imagePath}/icon.doc.gif" width="18"
                                                               height="20" />
                                                     </f:facet>
                  
                                                     <s:div styleClass="directoryTreeLabel">
                                                          <s:link view="#{dt.link}" propagation="end">
                                                               <f:param value="#{dt.id}" name="elementId" />
                                                               <h:outputText value="#{cdm:truncateString(dt.name, 40, '...')}" />
                                                          </s:link>
                                                     </s:div>
                                                </rich:treeNode>
                                           </rich:recursiveTreeNodesAdaptor>
                                      </rich:tree></div>
                                 </h:form>
                            </rich:panel></div>
                       </s:div>
                  </ui:composition>







                  19:34:31,278 ERROR [viewhandler] Error Rendering View[/view/product_d.xhtml]
                  java.lang.IllegalStateException: duplicate Id for a component navigationForm:j_id101:j_id104
                       at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:68)
                       at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:78)
                       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$SeamStateManagerWrapper.saveView(AjaxStateManager.java:105)
                       at org.jboss.seam.jsf.SeamStateManager.saveView(SeamStateManager.java:89)
                       at org.ajax4jsf.application.AjaxStateManager.saveSerializedView(AjaxStateManager.java:454)
                       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:615)
                       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.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                       at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
                       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
                       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                       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.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
                       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                       at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
                       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                       at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
                       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                       at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                       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:235)
                       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
                       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
                       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
                       at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                       at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                       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:158)
                       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
                       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
                       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                       at java.lang.Thread.run(Thread.java:637)




                  • 9. Re: Seam 2.1.0SP1 bug: duplicate Id for a component, bad jsf-facelets.jar
                    Stuart Douglas Master

                    What happens if you assign an id to every jsf component in the rich:tree? I am using a rich:tree with the same version of facelets and it works fine but mine has manual id assigned to every component in the tree (originally this was done to reduce the page size, but this may also be the reason why I have not run into this bug).

                    • 10. Re: Seam 2.1.0SP1 bug: duplicate Id for a component, bad jsf-facelets.jar
                      Robert Morse Apprentice

                      Same exception, only my assigned names are substituted for the auto-assigned versions in the previously posted exception.

                      • 11. Re: Seam 2.1.0SP1 bug: duplicate Id for a component, bad jsf-facelets.jar
                        Stuart Douglas Master

                        What is the actual component that is being duplicated? You should be able to tell with the user assigned names.

                        • 13. Re: Seam 2.1.0SP1 bug: duplicate Id for a component, bad jsf-facelets.jar
                          Stuart Douglas Master

                          What version of RF are you using? I am using 3.2.2.SR1 and I have a tree that looks pretty much the same and it works fine, the only real differences that I can see if that my tree does not have a binding and has a switchtype of client.

                          • 14. Re: Seam 2.1.0SP1 bug: duplicate Id for a component, bad jsf-facelets.jar
                            Robert Morse Apprentice

                            3.3.1.GA.  I tried client mode, but with the same results.  I wish Francisco would chime in since it looks like he had the same issue, and I wonder if he resolved it.

                            1 2 Previous Next