• Error when using RPC and ContentPane on same page

    By Karsten Kropp 1 decade ago

    I have an XPage containing RPC-Services (jsonRpcService) and ContentPanes (djContentPane) with partialRefresh="true". Sometimes the content of the contentPane couldn't be loaded. I get the following error:

    java.lang.NullPointerException
        com.ibm.xsp.component.UIDataPanelBase.encodeEnd(UIDataPanelBase.java:280)
        com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:856)
        com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:851)
        com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:851)
        com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:851)
        com.ibm.xsp.component.UIViewRootEx._renderView(UIViewRootEx.java:1317)
        com.ibm.xsp.component.UIViewRootEx.renderView(UIViewRootEx.java:1255)
        com.ibm.xsp.application.ViewHandlerExImpl.doRender(ViewHandlerExImpl.java:641)
        com.ibm.xsp.application.ViewHandlerExImpl._renderView(ViewHandlerExImpl.java:320)
        com.ibm.xsp.application.ViewHandlerExImpl.renderView(ViewHandlerExImpl.java:335)
        com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:103)
        com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210)
        com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:120)
        com.ibm.xsp.controller.FacesControllerImpl.render(FacesControllerImpl.java:264)
        com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:209)
        com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:200)
        com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
        com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:137)
        com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)
        com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:576)
    
        com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1267)
        com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:847)
        com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796)
        com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565)
        com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1251)
        com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:598)
        com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:421)
        com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:341)
        com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:297)
        com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)

     

    • Do you have a reproducible example?

      By Philippe Riand 1 decade ago

      It looks like encodeBegin hasn't been called and thus encodeEnd throws a NPE. I need a reproducible example to understand what happens.

      • Example and further details

        By Karsten Kropp 1 decade ago

        Please try the example attached.

        The problem doesn't occured every time you load the XPage. Please try it several times. I attache two screenshots.

         

         

        • Looks like this document is corrupted

          By Philippe Riand 1 decade ago

          I cannot download the attachment

          • File again

            By Karsten Kropp 1 decade ago

             

            • It works for me

              By Philippe Riand 1 decade ago

              I'm using the very last build, so it might have been indirectly fixed. Please try it with the latest build that we'll make available later this week.

              • I will try it

                By Karsten Kropp 1 decade ago

                I will try it with the next release of the Extension Library.

                Have you tried it several times? Because within our system the issue isn't reproducable each time.

                • Just tried it 10 times in a row

                  By Philippe Riand 1 decade ago

                  and it worked all the times. We'll produce an openNTF build soon, so you'll be able to try it again.

                • In fact I might have found something

                  By Philippe Riand 1 decade ago

                  I'm not able to reproduce the issue, but by looking deeply into the code, I found an issue in the request synchronization that might lead to this error. Unfortunately, this is an issue in core, which then requires a product fix and there is no workaround.

                  • Raise PMR?

                    By Karsten Kropp 1 decade ago

                    Should I raise a PMR? (and what should I tell?) What would you  suggest? When will it be fixed? Will there be a hotfix?

                    • Please raise a PMR for SPR#PHAN8PJJPF

                      By Maire Kehoe 1 decade ago

                      Yes, please raise a PMR for this.

                      We have logged the issue as SPR#PHAN8PJJPF, but a PMR will make higher priority and more likely to be included in a Fix Pack.

                      Thanks for your assistance tracking this down.

                      • workaround for SPR#PHAN8PJJPF

                        By Maire Kehoe 1 decade ago

                        This workaround will work for your specific example. It means the xe:djContentPane is not evaluated during the xe:jsonRpcService requests, so it will avoid the race condition for this example. The workaround may not work for other scenarios involving an xe:djContentPane control.

                        In the Application Properties, XPages tab, in the Performance section,
                        uncheck the check-box "Evaluate the entire page on partial refresh".
                        The xsp.properties file will then contain:
                        xsp.ajax.renderwholetree=false
                        Note, that applications created in Designer 8.5.2 or later will have this check-box unchecked by default,
                        it is only older applications created in 8.5.0 or 8.5.1 that are likely to show this behavior.

                        When you uncheck the option, you may have to re-test your application,
                        to verify that partial refresh/ partial update functionality continues to behave as expected, without runtime exceptions.
                        Exceptions can occur because the change means
                        that code outside the partial refresh area is not executed during partial refresh,
                        so if code in the refresh area was depending on values computed elsewhere in the XPage,
                        that code would have to be modified to re-compute the values within in the partial refresh area.