2 Replies Latest reply on Apr 28, 2008 3:03 PM by Nick Belaevski

    Bug? having troubles to render tree...

    1 1 Newbie

       

      <h:form>
       <rich:panel>
       <rich:tree id="tree">
       <rich:treeNodesAdaptor>
       ...
       </rich:treeNodesAdaptor>
       </rich:tree>
       </rich:panel>
       <rich:simpleTogglePanel id="panel">
       <a4j:commandButton type="button">
       <a4j:support
       event="onclick" reRender="tree, panel" />
       </a4j:commandButton>
       </rich:simpleTogglePanel>
      


      The tree is displayed when the page loads... but on the button's click this exception apears in the screen (the button's action runs normally):


      14:59:44,453 WARN [lifecycle] executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@1c534c3) threw exception
      javax.faces.FacesException: java.lang.NullPointerException
       at org.richfaces.renderkit.TreeRendererBase.encodeAjaxChildren(TreeRendererBase.java:457)
       at org.ajax4jsf.component.UIDataAdaptor.encodeAjaxChild(UIDataAdaptor.java:421)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:123)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
       at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:122)
       at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:553)
       at org.ajax4jsf.component.AjaxViewRoot$4.invokeRoot(AjaxViewRoot.java:384)
       at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:56)
       at org.ajax4jsf.context.AjaxContextImpl.invokeOnRegionOrRoot(AjaxContextImpl.java:170)
       at org.ajax4jsf.component.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:401)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
       at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
       at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
       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: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:141)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
       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)
      Caused by: java.lang.NullPointerException
       at org.richfaces.renderkit.NodeRendererBase.initializeLines(NodeRendererBase.java:121)
       at org.richfaces.renderkit.html.TreeNodeRenderer.doEncodeBegin(TreeNodeRenderer.java:101)
       at org.richfaces.renderkit.html.TreeNodeRenderer.doEncodeBegin(TreeNodeRenderer.java:86)
       at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:101)
       at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:280)
       at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement.process(TreeRendererBase.java:265)
       at org.richfaces.model.AbstractTreeDataModel.processElement(AbstractTreeDataModel.java:132)
       at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:270)
       at org.richfaces.model.StackingTreeModel$Visitor1.process(StackingTreeModel.java:383)
       at org.richfaces.model.StackingTreeModel$ShiftingDataVisitor.process(StackingTreeModel.java:418)
       at org.richfaces.model.StackingTreeModel$1.process(StackingTreeModel.java:308)
       at org.richfaces.model.SequenceDataModel.walk(SequenceDataModel.java:61)
       at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:292)
       at org.richfaces.model.StackingTreeModel$Visitor1.process(StackingTreeModel.java:383)
       at org.richfaces.model.StackingTreeModel$ShiftingDataVisitor.process(StackingTreeModel.java:418)
       at org.richfaces.model.StackingTreeModel$1.process(StackingTreeModel.java:308)
       at org.richfaces.model.SequenceDataModel.walk(SequenceDataModel.java:61)
       at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:292)
       at org.richfaces.model.StackingTreeModel$Visitor1.process(StackingTreeModel.java:383)
       at org.richfaces.model.StackingTreeModel$ShiftingDataVisitor.process(StackingTreeModel.java:418)
       at org.richfaces.model.StackingTreeModel$1.process(StackingTreeModel.java:308)
       at org.richfaces.model.SequenceDataModel.walk(SequenceDataModel.java:61)
       at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:292)
       at org.richfaces.model.StackingTreeModel.walk(StackingTreeModel.java:351)
       at org.richfaces.component.UITree.walk(UITree.java:381)
       at org.richfaces.renderkit.TreeRendererBase.writeContent(TreeRendererBase.java:631)
       at org.richfaces.renderkit.TreeRendererBase.encodeAjaxChildren(TreeRendererBase.java:436)
       ... 45 more
      14:59:44,468 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      java.lang.NullPointerException
       at org.richfaces.renderkit.NodeRendererBase.initializeLines(NodeRendererBase.java:121)
       at org.richfaces.renderkit.html.TreeNodeRenderer.doEncodeBegin(TreeNodeRenderer.java:101)
       at org.richfaces.renderkit.html.TreeNodeRenderer.doEncodeBegin(TreeNodeRenderer.java:86)
       at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:101)
       at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:280)
       at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement.process(TreeRendererBase.java:265)
       at org.richfaces.model.AbstractTreeDataModel.processElement(AbstractTreeDataModel.java:132)
       at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:270)
       at org.richfaces.model.StackingTreeModel$Visitor1.process(StackingTreeModel.java:383)
       at org.richfaces.model.StackingTreeModel$ShiftingDataVisitor.process(StackingTreeModel.java:418)
       at org.richfaces.model.StackingTreeModel$1.process(StackingTreeModel.java:308)
       at org.richfaces.model.SequenceDataModel.walk(SequenceDataModel.java:61)
       at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:292)
       at org.richfaces.model.StackingTreeModel$Visitor1.process(StackingTreeModel.java:383)
       at org.richfaces.model.StackingTreeModel$ShiftingDataVisitor.process(StackingTreeModel.java:418)
       at org.richfaces.model.StackingTreeModel$1.process(StackingTreeModel.java:308)
       at org.richfaces.model.SequenceDataModel.walk(SequenceDataModel.java:61)
       at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:292)
       at org.richfaces.model.StackingTreeModel$Visitor1.process(StackingTreeModel.java:383)
       at org.richfaces.model.StackingTreeModel$ShiftingDataVisitor.process(StackingTreeModel.java:418)
       at org.richfaces.model.StackingTreeModel$1.process(StackingTreeModel.java:308)
       at org.richfaces.model.SequenceDataModel.walk(SequenceDataModel.java:61)
       at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:292)
       at org.richfaces.model.StackingTreeModel.walk(StackingTreeModel.java:351)
       at org.richfaces.component.UITree.walk(UITree.java:381)
       at org.richfaces.renderkit.TreeRendererBase.writeContent(TreeRendererBase.java:631)
       at org.richfaces.renderkit.TreeRendererBase.encodeAjaxChildren(TreeRendererBase.java:436)
       at org.ajax4jsf.component.UIDataAdaptor.encodeAjaxChild(UIDataAdaptor.java:421)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:123)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
       at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
       at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:122)
       at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:553)
       at org.ajax4jsf.component.AjaxViewRoot$4.invokeRoot(AjaxViewRoot.java:384)
       at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:56)
       at org.ajax4jsf.context.AjaxContextImpl.invokeOnRegionOrRoot(AjaxContextImpl.java:170)
       at org.ajax4jsf.component.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:401)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
       at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
       at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
       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: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:141)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
       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)
      


      This only occurs on the first click of the button... after that none exception is shown... and the button works just fine...
      Any clues?
      Thanks in advace.