10 Replies Latest reply on Dec 13, 2007 3:35 PM by Sergey Smirnov

    Updated to latest richfaces-ui. Multiple errors emerge

    Martin Jozef Newbie

      I got the impression that all the releases since 3.1.0 have a lot of quirks and very error prone
      I would like to hear opinions on that from others.

      In meantime i have this Exception that i can't solve. Any advice would be great.

      Using
      JSF 1.2_06 RI
      Facelets 1.1.14
      richfaces-ui-3.1.3.SP1.jar
      richfaces-impl-3.1.2.SP1.jar
      richfaces-api-3.1.2.SP1.jar
      Websphere 6.1.013 JDK 5 impl J2EE 1.4 spec


      Error Rendering View[/quote/quote.xhtml]
       java.lang.NullPointerException
       at org.richfaces.renderkit.TabPanelRendererBase.encodeTabs(TabPanelRendererBase.java:327)
       at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeBegin(TabPanelRenderer.java:227)
       at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeBegin(TabPanelRenderer.java:180)
       at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:101)
       at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:801)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:934)
       at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:825)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
       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 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
       at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
       at com.bipt.tiva.interceptor.SessionFilter.doFilter(SessionFilter.java:45)
       at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
       at org.springframework.webflow.executor.jsf.FlowSystemCleanupFilter.doFilterInternal(FlowSystemCleanupFilter.java:40)
       at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
       at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
       at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:766)
       at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:674)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
       at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
       at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
       at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
       at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
       at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
       at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
       at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
       at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
       at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
       at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
       at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
       at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
       at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
       at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
       at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
       at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
      


        • 2. Re: Updated to latest richfaces-ui. Multiple errors emerge
          Martin Jozef Newbie

          I use Sun RI implementation latest release
          I use facelets because the JSP spec we use is older from what JSF1.2 requires

          and I now let's try this Error for size :

          Error Rendering View[/policy/customer/view.xhtml]
           java.lang.NullPointerException
           at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.augmentIdReference(HtmlBasicRenderer.java:196)
           at com.sun.faces.renderkit.html_basic.LabelRenderer.encodeBegin(LabelRenderer.java:86)
           at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:801)
           at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:232)
           at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:178)
           at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:126)
           at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:825)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
           at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
           at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
           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 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
           at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
           at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
           at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
           at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
           at com.bipt.tiva.interceptor.SessionFilter.doFilter(SessionFilter.java:45)
           at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
           at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
           at org.springframework.webflow.executor.jsf.FlowSystemCleanupFilter.doFilterInternal(FlowSystemCleanupFilter.java:40)
           at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
           at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
           at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
           at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
           at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:766)
           at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:674)
           at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
           at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
           at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
           at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
           at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
           at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
           at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
           at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
           at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:263)
           at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
           at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
           at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
           at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
           at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
           at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
           at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
           at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
           at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
           at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
          


          • 3. Re: Updated to latest richfaces-ui. Multiple errors emerge
            Ilya Shaikovsky Master

            It will be easier to create bug wilth sample(war) attachment

            • 4. Re: Updated to latest richfaces-ui. Multiple errors emerge
              Martin Jozef Newbie

              I actually resolved the last exception i posted

              If you notice in the Exception :

               java.lang.NullPointerException
               at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.augmentIdReference(HtmlBasicRenderer.java:1
              96)
               at com.sun.faces.renderkit.html_basic.LabelRenderer.encodeBegin(LabelRenderer.java:86)
              


              Error occured in the LabelRenderer
              and in the method HtmlBasicRenderer.augmentIdReference

              this gave me a clue that it might be something with a label component and it's id or lack of

              i went into my code and noticed that i have a label component without specified id. So i provided a unique id effectively removing the exception .

              from this i learned that i need to provide id's for labels as well.
              but i will check with the spec if that is the case since in 1.1 that was not an issue.

              • 5. Re: Updated to latest richfaces-ui. Multiple errors emerge
                Florian Marwede Expert

                You wrote you use

                richfaces-ui-3.1.3.SP1.jar
                richfaces-impl-3.1.2.SP1.jar
                richfaces-api-3.1.2.SP1.jar

                In my opinion all richfaces jars must be from the same version.

                @martinjozef: Please check this.

                @ilya: Or am I wrong?

                • 6. Re: Updated to latest richfaces-ui. Multiple errors emerge
                  Martin Jozef Newbie

                  Good notice

                  but indeed when i downloaded the

                  richfaces-ui-3.1.2.SP1-bin archive file

                  it contains such files:

                  richfaces-api-3.1.2.SP1.jar
                  richfaces-impl-3.1.2.SP1.jar
                  richfaces-ui-3.1.2.SP1.jar
                  richfaces-ui-3.1.3.SP1.jar

                  initially i used the 3.1.2 version only,

                  I used the 3.1.3 to see if any difference, but i suspect it's probably the same package.

                  • 7. Re: Updated to latest richfaces-ui. Multiple errors emerge
                    Martin Jozef Newbie

                    I a really at a loss here
                    do you guys know how this output can help me determine why i get the exception :
                    This is a component tree that Facelets prints in time of the exception

                    <AjaxViewRoot viewId="/quote/quote.xhtml" renderRegionOnly="false" immediate="false" rendered="true" submitted="false" transient="false" renderKitId="HTML_BASIC" selfRendered="false" id="_viewRoot" locale="en_US">
                    
                     <FlowExecutionKeyStateHolder id="FlowExecutionKeyStateHolder" rendered="true" flowExecutionKey="_c6ACDCFC8-B208-7DAA-FDB6-0F963F31B987_k89D6B046-88FA-A1B1-0773-E14A33484E2E" transient="false"/>
                    
                     <link href="${facesContext.externalContext.requestContextPath}/theme/screen.css" rel="stylesheet" type="text/css"/> <link rel="stylesheet" href="${facesContext.externalContext.requestContextPath}/style_Inner.css" type="text/css"/> <style> <!-- .2columnStyle{ vertical-align: top; width: 300px } .1columnStyle{ vertical-align: top; width: 600px; text-align: center } --> </style>
                    
                     <HtmlForm rendered="true" submitted="false" transient="false" enctype="application/x-www-form-urlencoded" id="j_id1" prependId="true">
                    
                     <HtmlTabPanel headerSpacing="1px" immediate="false" id="j_id2" valid="true" localValueSet="false" switchType="ajax" rendered="true" transient="false" required="false" headerAlignment="left" binding="#{quoteRenderer.panel}">
                    
                     <HtmlTab timeout="-2147483648" disabled="false" limitToList="false" immediate="false" ontableave="" ajaxSingle="false" active="true" rendered="true" label="Applicant" bypassUpdates="false" transient="false" ignoreDupResponses="false" requestDelay="-2147483648" ontabenter="">
                    
                     <HtmlInputText disabled="false" readonly="false" immediate="false" id="sfsfsdfsdsfssdfsf" valid="true" localValueSet="false" size="25" rendered="true" transient="false" required="false" maxlength="-2147483648"/>
                    
                     </HtmlTab>
                    
                     <HtmlTab timeout="-2147483648" disabled="false" limitToList="false" immediate="false" ontableave="" ajaxSingle="false" active="false" rendered="true" label="Premisis" bypassUpdates="false" transient="false" ignoreDupResponses="false" requestDelay="-2147483648" ontabenter="">
                    
                     <HtmlInputText disabled="false" readonly="false" immediate="false" id="sdfasfasfsfwrwerrwr" valid="true" localValueSet="false" size="25" rendered="true" transient="false" required="false" maxlength="-2147483648"/>
                    
                     </HtmlTab>
                    
                     </HtmlTabPanel>
                    
                     </HtmlForm>
                    
                    </AjaxViewRoot>
                    


                    What i learned so far is that when i contain only one tab the page renders without a problem,
                    but as soon i added the second tab, i get an exception :

                    java.lang.NullPointerException
                     at org.richfaces.renderkit.TabPanelRendererBase.encodeTabs(TabPanelRendererBase.java:327)
                     at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeBegin(TabPanelRenderer.java:227)
                     at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeBegin(TabPanelRenderer.java:180)
                     at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:101)
                     at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:801)
                     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:934)
                     at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
                     at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:825)
                     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
                     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
                     at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
                     at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
                     at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
                     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)
                    


                    • 8. Re: Updated to latest richfaces-ui. Multiple errors emerge
                      Martin Jozef Newbie

                      Ok, let me share my experience with this..

                      It turns out that RichFaces is not at fault in any of my cases.

                      i am building Component tree dynamically for the UI

                      hence a lot of my components do not get id assigned explicitly, i expected them to auto generate.

                      Well, Sun RI 1.2_06 is not so forgiving, it failed and it did not provide a clean reason why.

                      I decided to build with Maven Apache MyFaces 1.2.1 snapshot, i needed the latest since it contains a patch that allows me to run on pre-JSP 2.1 container.
                      Once started my project, all of my pages worked correctly.

                      Printing only warnings :

                      UIComponentBa W javax.faces.component.UIComponentBase getClientId WARNING: Component j_id72 just got an automatic id, because there was no id a
                      ssigned yet. If this component was created dynamically (i.e. not by a JSP tag) you should assign it an explicit static id or assign it the id you get from the createUniqueId from t
                      he current UIViewRoot component right after creation! Path to Component: {Component-Path : [Class: org.ajax4jsf.component.AjaxViewRoot,ViewId: /policy/customer/view.xhtml][Class: j
                      avax.faces.component.html.HtmlPanelGrid,Id: j_id25][Class: javax.faces.component.html.HtmlOutputText,Id: j_id72]}



                      In any case thanks for the attentiveness.

                      I will now go bother SUN RI for doing such a bad job.

                      • 9. Re: Updated to latest richfaces-ui. Multiple errors emerge
                        Jason Kissinger Newbie

                        Which should we be using?

                        richfaces-ui-3.1.3.SP1.jar

                        or

                        richfaces-ui-3.1.2.SP1.jar


                        Both are in the 3.1.2SP1 download.

                        • 10. Re: Updated to latest richfaces-ui. Multiple errors emerge
                          Sergey Smirnov Master

                          richfaces-ui-3.1.2.SP1.jar is only one that exists

                          3.1.3 has not been released.