2 Replies Latest reply on Aug 26, 2010 10:08 AM by Zaheer Ahmed

    reRender gives 'Null Exception' on scrollableDataTable

    Zaheer Ahmed Novice

      Hi All

       

      I wonder if someone has had a same issus with reRender as i do?  I use this panel to add "Notes"

      <rich:modalPanel id="panel"">
        <h:form>
         <h:panelGrid columns="3">
          <h:outputLabel for="descr" value="Note"></h:outputLabel>
          <rich:spacer width="10px"></rich:spacer>
          <h:inputTextarea id="descr" value="#{notesController.descr}" cols="40"
           rows="10"></h:inputTextarea>
          <rich:spacer style='display:block'></rich:spacer>
         </h:panelGrid>

         <h:panelGrid columns="3">
          <a href="#"
           onclick="javascript:Richfaces.hideModalPanel('panel'); return false;">Cancel</a>
          <rich:spacer width="320px" />
          <a4j:commandLink action="#{notesController.addNote}"
           oncomplete="#{rich:component('panel')}.hide()" title="Save changes" reRender="notes">Save
         </a4j:commandLink>
         </h:panelGrid>
        </h:form>
      </rich:modalPanel>

       

      and reRendering this panel.  If i don't use <a4j:support/> it reRenders fine but
      with <a4j:support> it gives me NullPointerException ...


        <rich:scrollableDataTable rowKeyVar="rkv" width="775px" height="140px"
         id="notes" rows="40" columnClasses="col" value="#{notesController.noteList}"
         var="noteData" rowClasses="r2, r3">

         <a4j:support event="onRowDblClick"
          oncomplete="#{rich:component('UpdatePanel')}.show();"
          reRender="UpdatePanel">
          <f:setPropertyActionListener value="#{noteData}"
           target="#{notesController.noteList}" />
         </a4j:support>

         <rich:column id="desc" width="684px" sortable="false"
          headerClass="headerNotes">
          <f:facet name="header">
           <h:outputText styleClass="headerText" />
          </f:facet>
          <h:outputText value="#{noteData.noteTitle}" />
         </rich:column>
        </rich:scrollableDataTable>
      </h:form>

      Anyone with any ideas????
      Thanks

        • 1. Re: reRender gives 'Null Exception' on scrollableDataTable
          Ilya Shaikovsky Master

          plese post full stacktrace to check where the NPE occurs.

          • 2. Re: reRender gives 'Null Exception' on scrollableDataTable
            Zaheer Ahmed Novice

            Thanks for your reply

            26-Aug-2010 14:33:23 org.ajax4jsf.webapp.BaseXMLFilter doXmlFilter

            SEVERE: Exception in the filter chain

            javax.servlet.ServletException

            at javax.faces.webapp.FacesServlet.service(

            FacesServlet.java:325)

            at org.apache.catalina.core.StandardWrapper.service(

            StandardWrapper.java:1523)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(

            ApplicationFilterChain.java:343)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(

            ApplicationFilterChain.java:215)

            at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(

            BaseXMLFilter.java:206)

            at org.ajax4jsf.webapp.BaseFilter.handleRequest(

            BaseFilter.java:290)

            at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(

            BaseFilter.java:388)

            at org.ajax4jsf.webapp.BaseFilter.doFilter(

            BaseFilter.java:515)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(

            ApplicationFilterChain.java:256)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(

            ApplicationFilterChain.java:215)

            at org.apache.catalina.core.StandardWrapperValve.invoke(

            StandardWrapperValve.java:277)

            at org.apache.catalina.core.StandardContextValve.invoke(

            StandardContextValve.java:188)

            at org.apache.catalina.core.StandardPipeline.invoke(

            StandardPipeline.java:641)

            at com.sun.enterprise.web.WebPipeline.invoke(

            WebPipeline.java:97)

            at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(

            PESessionLockingStandardPipeline.java:85)

            at org.apache.catalina.core.StandardHostValve.invoke(

            StandardHostValve.java:185)

            at org.apache.catalina.connector.CoyoteAdapter.doService(

            CoyoteAdapter.java:332)

            at org.apache.catalina.connector.CoyoteAdapter.service(

            CoyoteAdapter.java:233)

            at com.sun.enterprise.v3.services.impl.ContainerMapper.service(

            ContainerMapper.java:165)

            at com.sun.grizzly.http.ProcessorTask.invokeAdapter(

            ProcessorTask.java:791)

            at com.sun.grizzly.http.ProcessorTask.doProcess(

            ProcessorTask.java:693)

            at com.sun.grizzly.http.ProcessorTask.process(

            ProcessorTask.java:954)

            at com.sun.grizzly.http.DefaultProtocolFilter.execute(

            DefaultProtocolFilter.java:170)

            at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(

            DefaultProtocolChain.java:135)

            at com.sun.grizzly.DefaultProtocolChain.execute(

            DefaultProtocolChain.java:102)

            at com.sun.grizzly.DefaultProtocolChain.execute(

            DefaultProtocolChain.java:88)

            at com.sun.grizzly.http.HttpProtocolChain.execute(

            HttpProtocolChain.java:76)

            at com.sun.grizzly.ProtocolChainContextTask.doCall(

            ProtocolChainContextTask.java:53)

            at com.sun.grizzly.SelectionKeyContextTask.call(

            SelectionKeyContextTask.java:57)

            at com.sun.grizzly.ContextTask.run(

            ContextTask.java:69)

            at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(

            AbstractThreadPool.java:330)

            at com.sun.grizzly.util.AbstractThreadPool$Worker.run(

            AbstractThreadPool.java:309)

            at java.lang.Thread.run(

            Thread.java:619)

            Caused by:

            java.lang.NullPointerException

            at javax.faces.component.UIComponentBase.findComponent(

            UIComponentBase.java:564)

            at org.ajax4jsf.component.EventValueExpression.getComponent(

            EventValueExpression.java:98)

            at org.ajax4jsf.component.AbstractEventValueExpression.getValue(

            AbstractEventValueExpression.java:98)

            at org.richfaces.component.html.HtmlScrollableDataTable.getOnRowClick(

            HtmlScrollableDataTable.java:589)

            at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)

            at sun.reflect.DelegatingMethodAccessorImpl.invoke(

            DelegatingMethodAccessorImpl.java:25)

            at java.lang.reflect.Method.invoke(

            Method.java:597)

            at javax.faces.component.UIComponentBase$AttributesMap.get(

            UIComponentBase.java:2146)

            at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.addRowJavascriptEvents(

            ScrollableDataTableBaseRenderer.java:971)

            at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.access$1100(

            ScrollableDataTableBaseRenderer.java:65)

            at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer$7.process(

            ScrollableDataTableBaseRenderer.java:349)

            at org.ajax4jsf.model.SequenceDataModel.walk(

            SequenceDataModel.java:101)

            at org.ajax4jsf.component.UIDataAdaptorBase.walk(

            UIDataAdaptorBase.java:1156)

            at org.richfaces.component.UIScrollableDataTable.walk(

            UIScrollableDataTable.java:448)

            at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.renderGridBody(

            ScrollableDataTableBaseRenderer.java:555)

            at org.richfaces.renderkit.html.ScrollableDataTableRenderer.doEncodeEnd(

            ScrollableDataTableRenderer.java:413)

            at org.richfaces.renderkit.html.ScrollableDataTableRenderer.doEncodeEnd(

            ScrollableDataTableRenderer.java:590)

            at org.ajax4jsf.renderkit.RendererBase.encodeEnd(

            RendererBase.java:134)

            at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.encodeEnd(

            ScrollableDataTableBaseRenderer.java:888)

            at javax.faces.component.UIComponentBase.encodeEnd(

            UIComponentBase.java:878)

            at org.richfaces.component.UIScrollableDataTable.encodeEnd(

            UIScrollableDataTable.java:454)

            at org.ajax4jsf.renderkit.RendererBase.renderChild(

            RendererBase.java:281)

            at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(

            AjaxChildrenRenderer.java:166)

            at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(

            AjaxChildrenRenderer.java:83)

            at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(

            AjaxChildrenRenderer.java:157)

            at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(

            AjaxChildrenRenderer.java:83)

            at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(

            AjaxChildrenRenderer.java:157)

            at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(

            AjaxContainerRenderer.java:124)

            at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(

            AjaxViewRoot.java:685)

            at org.ajax4jsf.component.AjaxViewRoot.encodeChildren(

            AjaxViewRoot.java:556)

            at javax.faces.component.UIComponent.encodeAll(

            UIComponent.java:1613)

            at com.sun.faces.application.view.JspViewHandlingStrategy.doRenderView(

            JspViewHandlingStrategy.java:420)

            at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(

            JspViewHandlingStrategy.java:209)

            at com.sun.faces.application.view.MultiViewHandler.renderView(

            MultiViewHandler.java:126)

            at org.ajax4jsf.application.ViewHandlerWrapper.renderView(

            ViewHandlerWrapper.java:100)

            at org.ajax4jsf.application.AjaxViewHandler.renderView(

            AjaxViewHandler.java:176)

            at com.sun.faces.lifecycle.RenderResponsePhase.execute(

            RenderResponsePhase.java:127)

            at com.sun.faces.lifecycle.Phase.doPhase(

            Phase.java:101)

            at com.sun.faces.lifecycle.LifecycleImpl.render(

            LifecycleImpl.java:139)

            at javax.faces.webapp.FacesServlet.service(

            FacesServlet.java:313)

            ... 32 more

            26-Aug-2010 14:33:23 org.apache.catalina.core.StandardWrapperValve log

            WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception

            java.lang.NullPointerException

            at javax.faces.component.UIComponentBase.findComponent(

            UIComponentBase.java:564)

            at org.ajax4jsf.component.EventValueExpression.getComponent(

            EventValueExpression.java:98)

            at org.ajax4jsf.component.AbstractEventValueExpression.getValue(

            AbstractEventValueExpression.java:98)

            at org.richfaces.component.html.HtmlScrollableDataTable.getOnRowClick(

            HtmlScrollableDataTable.java:589)

            at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)

            at sun.reflect.DelegatingMethodAccessorImpl.invoke(

            DelegatingMethodAccessorImpl.java:25)

            at java.lang.reflect.Method.invoke(

            Method.java:597)

            at javax.faces.component.UIComponentBase$AttributesMap.get(

            UIComponentBase.java:2146)

            at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.addRowJavascriptEvents(

            ScrollableDataTableBaseRenderer.java:971)

            at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.access$1100(

            ScrollableDataTableBaseRenderer.java:65)

            at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer$7.process(

            ScrollableDataTableBaseRenderer.java:349)

            at org.ajax4jsf.model.SequenceDataModel.walk(

            SequenceDataModel.java:101)

            at org.ajax4jsf.component.UIDataAdaptorBase.walk(

            UIDataAdaptorBase.java:1156)

            at org.richfaces.component.UIScrollableDataTable.walk(

            UIScrollableDataTable.java:448)

            at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.renderGridBody(

            ScrollableDataTableBaseRenderer.java:555)

            at org.richfaces.renderkit.html.ScrollableDataTableRenderer.doEncodeEnd(

            ScrollableDataTableRenderer.java:413)

            at org.richfaces.renderkit.html.ScrollableDataTableRenderer.doEncodeEnd(

            ScrollableDataTableRenderer.java:590)

            at org.ajax4jsf.renderkit.RendererBase.encodeEnd(

            RendererBase.java:134)

            at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.encodeEnd(

            ScrollableDataTableBaseRenderer.java:888)

            at javax.faces.component.UIComponentBase.encodeEnd(

            UIComponentBase.java:878)

            at org.richfaces.component.UIScrollableDataTable.encodeEnd(

            UIScrollableDataTable.java:454)

            at org.ajax4jsf.renderkit.RendererBase.renderChild(

            RendererBase.java:281)

            at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(

            AjaxChildrenRenderer.java:166)

            at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(

            AjaxChildrenRenderer.java:83)

            at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(

            AjaxChildrenRenderer.java:157)

            at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(

            AjaxChildrenRenderer.java:83)

            at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(

            AjaxChildrenRenderer.java:157)

            at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(

            AjaxContainerRenderer.java:124)

            at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(

            AjaxViewRoot.java:685)

            at org.ajax4jsf.component.AjaxViewRoot.encodeChildren(

            AjaxViewRoot.java:556)

            at javax.faces.component.UIComponent.encodeAll(

            UIComponent.java:1613)

            at com.sun.faces.application.view.JspViewHandlingStrategy.doRenderView(

            JspViewHandlingStrategy.java:420)

            at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(

            JspViewHandlingStrategy.java:209)

            at com.sun.faces.application.view.MultiViewHandler.renderView(

            MultiViewHandler.java:126)

            at org.ajax4jsf.application.ViewHandlerWrapper.renderView(

            ViewHandlerWrapper.java:100)

            at org.ajax4jsf.application.AjaxViewHandler.renderView(

            AjaxViewHandler.java:176)

            at com.sun.faces.lifecycle.RenderResponsePhase.execute(

            RenderResponsePhase.java:127)

            at com.sun.faces.lifecycle.Phase.doPhase(

            Phase.java:101)

            at com.sun.faces.lifecycle.LifecycleImpl.render(

            LifecycleImpl.java:139)

            at javax.faces.webapp.FacesServlet.service(

            FacesServlet.java:313)

            at org.apache.catalina.core.StandardWrapper.service(

            StandardWrapper.java:1523)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(

            ApplicationFilterChain.java:343)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(

            ApplicationFilterChain.java:215)

            at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(

            BaseXMLFilter.java:206)

            at org.ajax4jsf.webapp.BaseFilter.handleRequest(

            BaseFilter.java:290)

            at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(

            BaseFilter.java:388)

            at org.ajax4jsf.webapp.BaseFilter.doFilter(

            BaseFilter.java:515)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(

            ApplicationFilterChain.java:256)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(

            ApplicationFilterChain.java:215)

            at org.apache.catalina.core.StandardWrapperValve.invoke(

            StandardWrapperValve.java:277)

            at org.apache.catalina.core.StandardContextValve.invoke(

            StandardContextValve.java:188)

            at org.apache.catalina.core.StandardPipeline.invoke(

            StandardPipeline.java:641)

            at com.sun.enterprise.web.WebPipeline.invoke(

            WebPipeline.java:97)

            at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(

            PESessionLockingStandardPipeline.java:85)

            at org.apache.catalina.core.StandardHostValve.invoke(

            StandardHostValve.java:185)

            at org.apache.catalina.connector.CoyoteAdapter.doService(

            CoyoteAdapter.java:332)

            at org.apache.catalina.connector.CoyoteAdapter.service(

            CoyoteAdapter.java:233)

            at com.sun.enterprise.v3.services.impl.ContainerMapper.service(

            ContainerMapper.java:165)

            at com.sun.grizzly.http.ProcessorTask.invokeAdapter(

            ProcessorTask.java:791)

            at com.sun.grizzly.http.ProcessorTask.doProcess(

            ProcessorTask.java:693)

            at com.sun.grizzly.http.ProcessorTask.process(

            ProcessorTask.java:954)

            at com.sun.grizzly.http.DefaultProtocolFilter.execute(

            DefaultProtocolFilter.java:170)

            at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(

            DefaultProtocolChain.java:135)

            at com.sun.grizzly.DefaultProtocolChain.execute(

            DefaultProtocolChain.java:102)

            at com.sun.grizzly.DefaultProtocolChain.execute(

            DefaultProtocolChain.java:88)

            at com.sun.grizzly.http.HttpProtocolChain.execute(

            HttpProtocolChain.java:76)

            at com.sun.grizzly.ProtocolChainContextTask.doCall(

            ProtocolChainContextTask.java:53)

            at com.sun.grizzly.SelectionKeyContextTask.call(

            SelectionKeyContextTask.java:57)

            at com.sun.grizzly.ContextTask.run(

            ContextTask.java:69)

            at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(

            AbstractThreadPool.java:330)

            at com.sun.grizzly.util.AbstractThreadPool$Worker.run(

            AbstractThreadPool.java:309)

            at java.lang.Thread.run(

            Thread.java:619)