0 Replies Latest reply on Aug 21, 2009 8:21 AM by praveen jain

    Null pointer Exception

    praveen jain Novice

      hi
      i am getting this exeption


      09/08/21 17:34:47 ERROR webapp._ErrorPageWriter: An exception occurred
      javax.faces.FacesException: java.lang.NullPointerException
      at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:166)
      at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:293)
      at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:172)
      at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:293)
      at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:172)
      at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:293)
      at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:172)
      at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:293)
      at org.ajax4jsf.component.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:543)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:250)
      at org.apache.myfaces.application.jsp.JspViewHandlerImpl.actuallyRenderView(JspViewHandlerImpl.java:427)
      at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:383)
      at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
      at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:155)
      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:178)
      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:301)
      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:175)
      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:263)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.NullPointerException
      at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1251)
      at org.apache.myfaces.component.html.ext.AbstractHtmlGraphicImage.isRendered(AbstractHtmlGraphicImage.java:62)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:75)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:67)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:115)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:67)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:115)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:67)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:115)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:67)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:115)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:67)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:115)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:67)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:115)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:67)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:115)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:67)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:115)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:67)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:115)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:67)
      at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:115)
      at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:123)
      at org.ajax4jsf.component.UIAjaxRegion.encodeAjax(UIAjaxRegion.java:267)
      at org.ajax4jsf.component.AjaxViewRoot$4.invokeContextCallback(AjaxViewRoot.java:489)
      at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:163)
      ... 37 more


      I got this exceptin when i Renrender the Page
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
      <link rel="stylesheet" type="text/css"
       href="../styles/CommonStyleSheet.css" />
       <a4j:outputPanel layout="block"
       style="height: 70px; background-color: white;" rendered="true">
       <t:panelGrid columns="2" border="0" width="305" cellpadding="0" cellspacing="0">
       <t:panelGrid cellpadding="0" cellspacing="0">
       <t:outputText value="Browse LAN" style="font-size: 12px; font-weight: bold" />
       <br />
       <t:outputText value="Select a netwrok share from the LAN" style="font-size: 12px;"/>
       </t:panelGrid>
      
       <t:panelGrid cellpadding="0" cellspacing="0" align="right">
       <t:graphicImage alt=""
       value="/images/header/gridbank/png/gridbank_64.png"
       align="right" />
       </t:panelGrid>
       </t:panelGrid>
       </a4j:outputPanel>
      
      <t:panelGrid width="310px" cellpadding="0" cellspacing="0" style="background-color: #F0F0F0; height: 205; margin-top: 5px;" >
       <t:panelGrid columns="3" style="background-color: white; height: 200;" width="308" cellpadding="0" cellspacing="0">
       <t:panelGrid cellpadding="0" cellspacing="0">
       <rich:panel style="height: 195px; width: 304px; overflow: auto;">
       <t:tree2 value="#{mainBind.customWizard.lanBrowser.treeNode}"
       var="node" binding="#{mainBind.customWizard.lanBrowser.tree}"
       varNodeToggler="t" >
       <f:facet name="en">
       <h:panelGroup>
       <f:facet name="expand">
       <t:graphicImage
       value="../images/GridBank/Folders/grid_network/png/grid_network_16.png"
       rendered="#{t.nodeExpanded}" border="0" />
       </f:facet>
       <f:facet name="collapse">
       <t:graphicImage
       value="../images/GridBank/Folders/grid_network/png/grid_network_16.png"
       rendered="#{!t.nodeExpanded}" border="0" />
       </f:facet>
       <h:outputText value="#{node.description}" styleClass="nodeFolder" />
       </h:panelGroup>
       </f:facet>
       <f:facet name="pn">
       <h:panelGroup>
       <f:facet name="expand">
       <t:graphicImage value="../images/GridBank/lan/Globe.png"
       rendered="#{t.nodeExpanded}" border="0" />
       </f:facet>
       <f:facet name="collapse">
       <t:graphicImage value="../images/GridBank/lan/Globe.png"
       rendered="#{!t.nodeExpanded}" border="0" />
       </f:facet>
       <h:outputText value="#{node.description}" styleClass="nodeFolder" />
       </h:panelGroup>
       </f:facet>
       <f:facet name="domain">
       <h:panelGroup>
       <f:facet name="expand">
       <t:graphicImage value="../images/GridBank/lan/group.png"
       rendered="#{t.nodeExpanded}" border="0" />
       </f:facet>
       <f:facet name="collapse">
       <t:graphicImage value="../images/GridBank/lan/group.png"
       rendered="#{!t.nodeExpanded}" border="0" />
       </f:facet>
       <h:outputText value="#{node.description}" styleClass="nodeFolder" />
       </h:panelGroup>
      
       </f:facet>
       <f:facet name="system">
       <h:panelGroup>
       <f:facet name="expand">
       <t:graphicImage value="../images/GridBank/lan/PC.png"
       rendered="#{t.nodeExpanded}" border="0" />
       </f:facet>
       <f:facet name="collapse">
       <t:graphicImage value="../images/GridBank/lan/PC.png"
       rendered="#{!t.nodeExpanded}" border="0" />
       </f:facet>
      
      
       <a4j:commandLink value="#{node.description}"
       styleClass="nodeFolder"
       action="#{mainBind.customWizard.lanBrowser.treeNodeClick}"
       oncomplete="Richfaces.showModalPanel('lanLoginDialog');"
       reRender="lanLoginDialog" />
       </h:panelGroup>
      
       </f:facet>
       <f:facet name="folder">
       <h:panelGroup>
       <f:facet name="expand">
       <t:graphicImage value="../images/GridBank/lan/PC.png"
       rendered="#{t.nodeExpanded}" border="0" />
       </f:facet>
       <f:facet name="collapse">
       <t:graphicImage value="../images/GridBank/lan/PC.png"
       rendered="#{!t.nodeExpanded}" border="0" />
       </f:facet>
      
       <a4j:commandLink value="#{node.description}"
       styleClass="nodeFolder"
       action="#{mainBind.customWizard.lanBrowser.folderNodeClick}"
       oncomplete="Richfaces.hideModalPanel('lanBrowser');"
       reRender="hostDetailsPanel" />
       </h:panelGroup>
      
       </f:facet>
       </t:tree2>
       </rich:panel>
       </t:panelGrid>
       </t:panelGrid>
       <t:panelGrid align="right" border="0" style="margin-top: 10px;">
       <a4j:commandButton value="Cancel" type="button"
       onclick="Richfaces.hideModalPanel('lanBrowser');"
       reRender="panelConfigureHostWizard" styleClass="CommandButton"></a4j:commandButton>
       </t:panelGrid>
      </t:panelGrid>
      
      
      
      

      First Time Page loads but on a action i am rerendering the same page but it gives this exception ?