6 Replies Latest reply: Oct 15, 2010 5:10 AM by gareth_western RSS

    Richfaces and Websphere Portal 6.1 Error

    Yashavanth Kuntavalli Newbie

      Hi,

      I am trying use richfaces tree component in Websphere portal application which is running on WAS 7.0.0.9,

      I could run the same JSF example on WAS 7.0.0.9 without any Errors, but when I add this into a portlet application I get following Error

       

      Caused by: java.lang.NullPointerException
      at org.ajax4jsf.renderkit.AjaxRendererUtils.buildEventOptions(AjaxRendererUtils.java:267)
      at org.ajax4jsf.renderkit.AjaxRendererUtils.buildEventOptions(AjaxRendererUtils.java:251)
      at org.richfaces.renderkit.NodeRendererBase.getToggleScript(NodeRendererBase.java:99)
      at org.richfaces.renderkit.html.TreeNodeRenderer.doEncodeBegin(TreeNodeRenderer.java:185)
      at org.richfaces.renderkit.html.TreeNodeRenderer.doEncodeBegin(TreeNodeRenderer.java:86)
      at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:100)
      at com.ibm.faces.renderkit.DefaultAjaxRenderer.encodeBegin(DefaultAjaxRenderer.java:64)
      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:802)
      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:275)
      at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement.process(TreeRendererBase.java:255)
      at org.richfaces.model.AbstractTreeDataModel.processElement(AbstractTreeDataModel.java:111)
      at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:294)
      at org.richfaces.model.StackingTreeModel$Visitor1.process(StackingTreeModel.java:416)
      at org.richfaces.model.StackingTreeModel$ShiftingDataVisitor.end(StackingTreeModel.java:461)
      at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:348)
      at org.richfaces.model.StackingTreeModel.walk(StackingTreeModel.java:387)
      at org.richfaces.component.UITree.walk(UITree.java:422)
      at org.richfaces.renderkit.TreeRendererBase.writeContent(TreeRendererBase.java:683)
      at org.richfaces.renderkit.TreeRendererBase.encodeChildren(TreeRendererBase.java:629)
      at com.ibm.faces.renderkit.DefaultAjaxRenderer.encodeChildren(DefaultAjaxRenderer.java:73)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
      at com.ibm.faces.renderkit.DefaultAjaxRenderer.encodeChildren(DefaultAjaxRenderer.java:73)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
      at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:289)
      at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:220)
      at com.ibm.faces.portlet.PortletViewHandlerImpl.renderView(PortletViewHandlerImpl.java:79)
      at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:179)
      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 com.ibm.faces.portlet.FacesPortlet.doRender(FacesPortlet.java:372)
      ... 245 more
      [9/14/10 2:03:47:328 CDT] 0000013a BaseXMLFilter E org.ajax4jsf.webapp.BaseXMLFilter doXmlFilter Exception in the filter chain
                                       javax.servlet.ServletException: javax.portlet.PortletException
      at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:361)

      Caused by: java.lang.NullPointerException

      at org.ajax4jsf.renderkit.AjaxRendererUtils.buildEventOptions(AjaxRendererUtils.java:267)

      at org.ajax4jsf.renderkit.AjaxRendererUtils.buildEventOptions(AjaxRendererUtils.java:251)

      at org.richfaces.renderkit.NodeRendererBase.getToggleScript(NodeRendererBase.java:99)

      at org.richfaces.renderkit.html.TreeNodeRenderer.doEncodeBegin(TreeNodeRenderer.java:185)

      at org.richfaces.renderkit.html.TreeNodeRenderer.doEncodeBegin(TreeNodeRenderer.java:86)

      at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:100)

      at com.ibm.faces.renderkit.DefaultAjaxRenderer.encodeBegin(DefaultAjaxRenderer.java:64)

      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:802)

      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:275)

      at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement.process(TreeRendererBase.java:255)

      at org.richfaces.model.AbstractTreeDataModel.processElement(AbstractTreeDataModel.java:111)

      at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:294)

      at org.richfaces.model.StackingTreeModel$Visitor1.process(StackingTreeModel.java:416)

      at org.richfaces.model.StackingTreeModel$ShiftingDataVisitor.end(StackingTreeModel.java:461)

      at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:348)

      at org.richfaces.model.StackingTreeModel.walk(StackingTreeModel.java:387)

      at org.richfaces.component.UITree.walk(UITree.java:422)

      at org.richfaces.renderkit.TreeRendererBase.writeContent(TreeRendererBase.java:683)

      at org.richfaces.renderkit.TreeRendererBase.encodeChildren(TreeRendererBase.java:629)

      at com.ibm.faces.renderkit.DefaultAjaxRenderer.encodeChildren(DefaultAjaxRenderer.java:73)

      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826)

      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)

      at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)

      at com.ibm.faces.renderkit.DefaultAjaxRenderer.encodeChildren(DefaultAjaxRenderer.java:73)

      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826)

      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)

      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)

      at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:289)

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

      at com.ibm.faces.portlet.PortletViewHandlerImpl.renderView(PortletViewHandlerImpl.java:79)

      at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)

      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:179)

      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 com.ibm.faces.portlet.FacesPortlet.doRender(FacesPortlet.java:372)

      ... 245 more

       

      [9/14/10 2:03:47:328 CDT] 0000013a BaseXMLFilter E org.ajax4jsf.webapp.BaseXMLFilter doXmlFilter Exception in the filter chain

                                       javax.servlet.ServletException: javax.portlet.PortletException

      at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:361)

       

      I have these entries in WEB.xml

       

      <filter>

      <display-name>RichFaces Filter</display-name>

      <filter-name>richfaces</filter-name>

      <filter-class>org.ajax4jsf.Filter</filter-class>

      </filter>

      <filter-mapping>

      <filter-name>richfaces</filter-name>

      <url-pattern>/*</url-pattern>

      <dispatcher>REQUEST</dispatcher>

      <dispatcher>FORWARD</dispatcher>

      <dispatcher>INCLUDE</dispatcher>

      </filter-mapping>

      <filter-mapping>

      <filter-name>richfaces</filter-name>

      <url-pattern>/.ibmjsfres/*</url-pattern>

      <dispatcher>REQUEST</dispatcher>

      <dispatcher>FORWARD</dispatcher>

      <dispatcher>INCLUDE</dispatcher>

      </filter-mapping>

      <filter-mapping>

      <filter-name>richfaces</filter-name>

      <url-pattern>/faces/*</url-pattern>

      <dispatcher>REQUEST</dispatcher>

      <dispatcher>FORWARD</dispatcher>

      <dispatcher>INCLUDE</dispatcher>

      </filter-mapping>

      <filter-mapping>

      <filter-name>richfaces</filter-name>

      <url-pattern>/faces/rfRes/*</url-pattern>

      <dispatcher>REQUEST</dispatcher>

      <dispatcher>FORWARD</dispatcher>

      <dispatcher>INCLUDE</dispatcher>

      <dispatcher>ERROR</dispatcher>

      </filter-mapping>

      <!-- End of Rich Faces related entries -->

       

      I am using Richfaces 3.3.3 Final version.

       

      Any help is greatly appreciated.

       

      Many Thanks in advance