• Xpages Preload bug

    By linming sunny 1 decade ago

    Report a bug for version Domino 8.5.3 about Xpages Preload feature. when I configed those parameters copy from official document in notes.ini, I can see the indicated nsf module has preloaded from console. like

    [0F48:0008-03E4] 2011-12-20 20:09:57   HTTP JVM: Preloading XPages classes took 532ms
    [0F48:0011-08D8] 2011-12-20 20:09:57   HTTP JVM: Preloading JSF config took 750ms
    [0F48:0023-0550] 2011-12-20 20:09:58   HTTP JVM: Preloading NSF SmartGlb.nsf module took 1141ms

    [0F48:0028-0EA8] 2011-12-20 20:09:58   HTTP JVM: java.lang.reflect.InvocationTargetException
    [0F48:002A-0EA8] 2011-12-20 20:09:58   HTTP JVM: Preloading NSF SmartGlb.nsf/Preload.xsp module took 1281ms

    but , de facto the preloaded nsf does not stay in memory, it will be destroyed after a little moment. this was found when I writed some codes by refer NSFService.getModules. Through java decompiler, I found the cause was that value of " PRELOADED_APP_TIMEOUT " which a static long constant of NSFService too large as Long.MAX_VALUE. Anything added to it will cause overflow and then make the module be treated as timeout and be destroyed.

     a unexpected InvocationTargetException also occured.

    • Sounds like an issue in the app

      By Philippe Riand 1 decade ago

      Can you please copy the full exception trace (should be in IBM_TECHNICAL _SUPPORT directory)

      • Xpages preload does not make nsf keep in memory

        By linming sunny 1 decade ago

        thank java decompiler, I read sourcecode of ComponentModule.java, see function isExpired()

         public boolean isExpired(long l)
            {
                long timeout = getApplicationTimeoutMs();
                return timeout > 0L && lastModuleAccess + timeout < l;
            }

         because for preloaded nsf , it's timeout is setted to PRELOADED_APP_TIMEOUT = 0x7fffffffffffffffL;

        it is Long.MAX_VALUE; so any number added to timeout will cause integer overflow, and lastModuleAccess + timeout will be less than 0, so "isExpired" always is TRUE;

        That InvokationException maybe regarded to the matter I modified  and hacked ModuleClassLoader.  So, you can ignore it.

        java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
            at java.lang.reflect.Method.invoke(Method.java:611)
            at com.ibm.designer.runtime.domino.adapter.preload.XPagesPreloader$NSFPreloader.loadServerPageLocal(XPagesPreloader.java:247)
            at com.ibm.designer.runtime.domino.adapter.preload.XPagesPreloader$NSFPreloader.run(XPagesPreloader.java:207)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
            at java.lang.Thread.run(Thread.java:736)
        Caused by: com.ibm.xsp.acl.NoAccessSignal
            at com.ibm.domino.xsp.module.nsf.NotesContext.checkAccess(NotesContext.java:1611)
            at com.ibm.domino.xsp.module.nsf.NotesContext.serverProcessSignedResource(NotesContext.java:955)
            at com.ibm.domino.xsp.module.nsf.NotesContext.setSignerSessionRights(NotesContext.java:926)
            at com.ibm.domino.xsp.module.nsf.ModuleClassLoader$DynamicClassLoader.loadClass(ModuleClassLoader.java:85)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:619)
            at com.ibm.domino.xsp.module.nsf.ModuleClassLoader.loadClass(ModuleClassLoader.java:468)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:619)
            at com.ibm.designer.runtime.Application.loadClass(Application.java:708)
            at com.ibm.xsp.library.ApplicationFacesClassLoader.loadClass(ApplicationFacesClassLoader.java:54)
            at com.ibm.xsp.page.compiled.CompiledPageDriver.getClassForPageName(CompiledPageDriver.java:169)
            at com.ibm.xsp.page.compiled.CompiledPageDriver.loadPage(CompiledPageDriver.java:61)
            at com.ibm.xsp.application.ViewHandlerExImpl._createViewRoot(ViewHandlerExImpl.java:489)
            at com.ibm.xsp.application.ViewHandlerExImpl.createViewRoot(ViewHandlerExImpl.java:557)
            at com.ibm.xsp.application.ViewHandlerExImpl.doCreateView(ViewHandlerExImpl.java:141)
            at com.ibm.xsp.application.ViewHandlerEx.createView(ViewHandlerEx.java:90)
            at com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:238)
            at com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:200)
            at com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
            at com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:137)
            at com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)
            at com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:576)
            at com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1267)
            at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:847)
            at com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796)
            at com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565)
            at com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1251)
            at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:598)
            at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:421)

        • Yes,this is a bug in core

          By Philippe Riand 1 decade ago

          Looks like a regression that had been introduced. Thanks for the info, we'll fix it.