myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Robinson" <andrew.rw.robin...@gmail.com>
Subject Re: Problem in Tree2: nullpointer org.apache.myfaces.custom.tree2.UITreeData.encodeEnd
Date Wed, 27 Jun 2007 22:43:04 GMT
I don't think this is the problem, but I don't think you want the
a4j:region outside of the form.

As for the exception, that would occur if the tree data model is null.
Here is the line:

TreeState state = getDataModel().getTreeState();

On 6/27/07, Novin <novin_jaiswal@ml.com> wrote:
>
> Hi freinds,
>
> I have implemented tamhalk tree2, Initially it was working fine but now It
> is throwing nullpointer when treis to render the tree.
>
> Pls help me. here is the JSP page code for the tree to be displayed and
> stack trace of the exception.
>
> Does any one have any idea?
>
> Here is the faces config file.
> http://www.nabble.com/file/p11330136/faces-config.xml faces-config.xml
>
>
> Thanks and Regards,
> Novin Jaiswal
>
> <f:subview id="accounttreesubview">
>         <a4j:region>
>                 <a4j:outputPanel ajaxRendered="true">
>                 <h:messages/>
>                 </a4j:outputPanel>
>                 <h:form id="frmAccountGrpupUpdate">
>                                         <a4j:outputPanel id="accountTreePanel">
>                                             <t:tree2 id="clientTree" value="#{accountTreeBean.treeData}"
> var="node" varNodeToggler="t" >
>                                                 <f:facet name="person" >
>                                                     <h:panelGroup id="grp1">
>                                                         <h:outputText value="#{node.description}"
 id="temp3"/>
>                                                     </h:panelGroup>
>                                                 </f:facet>
>
>                                                 <f:facet name="foo-folder">
>                                                     <h:panelGroup id="grp2">
>                                                         <h:outputText value="#{node.description}"
 id="temp7"/>
>                                                     </h:panelGroup>
>                                                 </f:facet>
>
>                                                 <f:facet name="document">
>                                                     <h:panelGroup id="grp3">
>                                                             <h:outputText value="#{node.description}"
> id="temp11"/>
>                                                     </h:panelGroup>
>                                                 </f:facet>
>                                             </t:tree2>
>                                         </a4j:outputPanel>
>                 </h:form>
>         </a4j:region>
> </f:subview>
>
>
>
>  SRVE0068E: Uncaught exception thrown in one of the service methods of the
> servlet: /pages/csin/tiles/account/accountTree.jsp. Exception thrown :
> java.lang.NullPointerException
>         at
> org.apache.myfaces.custom.tree2.UITreeData.encodeEnd(UITreeData.java:120)
>         at
> org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:286)
>         at
> org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
>         at
> org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:79)
>         at
> javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:735)
>         at
> org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:282)
>         at
> org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
>         at
> org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:284)
>         at
> org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
>         at
> org.ajax4jsf.framework.renderer.AjaxContainerRenderer.encodeChildren(AjaxContainerRenderer.java:100)
>         at
> javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:735)
>         at org.ajax4jsf.ajax.UIAjaxRegion.encodeChildren(UIAjaxRegion.java:117)
>         at
> javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:611)
>         at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:548)
>         at com.ibm._jsp._accountTree._jspx_meth_a4j_region_0(_accountTree.java:448)
>         at com.ibm._jsp._accountTree._jspx_meth_f_subview_0(_accountTree.java:468)
>         at com.ibm._jsp._accountTree._jspService(_accountTree.java:93)
>         at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>         at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
>         at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907)
>         at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:118)
>         at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
>         at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:701)
>         at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:646)
>         at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
>         at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
>         at
> com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:115)
>         at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:168)
>         at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:270)
>         at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:606)
>         at
> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1034)
>         at
> org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:484)
>         at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
>         at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
>         at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
>         at
> org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
>         at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
>         at
> com.ibm._jsp._commonLayout._jspx_meth_tiles_insert_3(_commonLayout.java:212)
>         at com.ibm._jsp._commonLayout._jspx_meth_f_view_0(_commonLayout.java:264)
>         at com.ibm._jsp._commonLayout._jspService(_commonLayout.java:131)
>         at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>         at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
>         at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907)
>         at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:118)
>         at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
>         at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:701)
>         at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:646)
>         at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
>         at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
>         at
> com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:115)
>         at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:168)
>         at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:308)
>         at
> com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:325)
>         at
> org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:236)
>         at
> org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:222)
>         at
> org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
>         at
> org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
>         at
> com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
>         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:220)
>         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:118)
>         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
>         at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
>         at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907)
>         at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
>         at
> org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
>         at
> org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
>         at
> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
>         at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
>         at
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
>         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:701)
>         at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:646)
>         at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
>         at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
>         at
> com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
>         at
> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
>         at
> com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
>         at
> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
>         at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
>         at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
>         at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
>         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:152)
>         at
> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
>         at
> com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
>         at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
>         at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
>         at
> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
>         at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
>         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
>
>
> --
> View this message in context: http://www.nabble.com/Problem-in-Tree2%3A-nullpointer-org.apache.myfaces.custom.tree2.UITreeData.encodeEnd-tf3990148.html#a11330136
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Mime
View raw message