我已經在很多應用程序中使用過xe:對話框,但是在新的XPage工作流表單中有幾個按鈕調用xe:對話框提示時出現問題。間歇性NullPointerException與XE:對話框
正如我測試這與幾個瀏覽器,用不同的登錄來模擬啓動器和批准者,按鈕工作正常。然後過了一段時間,單擊其中一個按鈕會導致「意外的運行時錯誤:運行時遇到意外錯誤。java.lang.NullPointerException」 - 從現在開始,沒有用戶可以單擊任何使用xe的按鈕:對話框 - 他們得到相同的錯誤。它在服務器上很混亂,我必須重新啓動HTTP或整個服務器才能讓它們再次運行。
在工作流程中,應用程序會發送帶有鏈接的電子郵件回到XPage。這個問題似乎是在用電子郵件的鏈接(用戶已登錄)打開應用程序後出現的最頻繁的問題。
所以,一些對象沒有被正確設置。我如何識別哪個對象沒有設置?
這裏的跟蹤
11/21/14 8:28 AM: Exception Thrown
Context Path: /aaa.nsf
Page Name: /test.xsp
javax.faces.FacesException: java.lang.NullPointerException
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:865)
at com.ibm.xsp.extlib.component.dynamiccontent.UIDynamicControl.invokeOnComponent(UIDynamicControl.java:254)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:878)
at com.ibm.xsp.extlib.component.dialog.UIDialog.invokeOnComponent(UIDialog.java:543)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:878)
at com.ibm.xsp.component.UIDataPanelBase.invokeOnComponent(UIDataPanelBase.java:416)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:878)
at com.ibm.xsp.component.UIDataPanelBase.invokeOnComponent(UIDataPanelBase.java:416)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:878)
at com.ibm.xsp.component.UIDataPanelBase.invokeOnComponent(UIDataPanelBase.java:416)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:878)
at com.ibm.xsp.component.UIDataPanelBase.invokeOnComponent(UIDataPanelBase.java:416)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:878)
at com.ibm.xsp.component.UIDataPanelBase.invokeOnComponent(UIDataPanelBase.java:416)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:878)
at com.ibm.xsp.component.UIDataPanelBase.invokeOnComponent(UIDataPanelBase.java:416)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:878)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:878)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:878)
at com.ibm.xsp.component.UIViewRootEx.invokeOnComponent(UIViewRootEx.java:1552)
at com.ibm.xsp.component.UIViewRootEx._invokePartialRefresh(UIViewRootEx.java:1323)
at com.ibm.xsp.component.UIViewRootEx2._invokePartialRefresh(UIViewRootEx2.java:132)
at com.ibm.xsp.component.UIViewRootEx._renderView(UIViewRootEx.java:1309)
at com.ibm.xsp.component.UIViewRootEx.renderView(UIViewRootEx.java:1255)
at com.ibm.xsp.application.ViewHandlerExImpl.doRender(ViewHandlerExImpl.java:651)
at com.ibm.xsp.application.ViewHandlerExImpl._renderView(ViewHandlerExImpl.java:321)
at com.ibm.xsp.application.ViewHandlerExImpl.renderView(ViewHandlerExImpl.java:336)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:103)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:120)
at com.ibm.xsp.controller.FacesControllerImpl.render(FacesControllerImpl.java:270)
at com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:224)
at com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:157)
at com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
at com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)
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:1335)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:853)
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:1319)
at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:662)
at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:482)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:357)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:313)
at com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
Caused by: java.lang.NullPointerException
at com.ibm.xsp.extlib.component.dynamiccontent.AbstractDynamicContent.createContent(AbstractDynamicContent.java:134)
at com.ibm.xsp.extlib.component.dialog.UIDialog$PopupContent.encodeBegin(UIDialog.java:224)
at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:842)
at com.ibm.xsp.component.UIViewRootEx$1.invokeContextCallback(UIViewRootEx.java:1326)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:862)
... 46 more
可能值得看看錯誤中引用的代碼。 AbstractDynamicContent(第134行) - https://github.com/OpenNTF/XPagesExtensionLibrary/blob/a915a03b169253ecfa1228ac860ab39e26a13881/extlib/lwp/product/runtime/eclipse/plugins/com.ibm.xsp.extlib.controls/src/com/ibm/ UIDialog(224行) - https://github.com/OpenNTF/XPagesExtensionLibrary/blob/a915a03b169253ecfa1228ac860ab39e26a13881/extlib/lwp/product/runtime/eclipse/plugins/com.ibm .xsp.extlib.controls/src/com/ibm/xsp/extlib/component/dialog/UIDialog.java – 2014-11-21 15:19:45
Brian - 感謝您的信息。解決這個問題的方法比我更喜歡挖掘的方式更深,但無論如何,AbstractDynamicContent行134是ViewStateBean.get()。initFromState();和UIDialog行224是createContent(ctx);不知道除了視圖狀態之外,還有什麼要做的。 – 2014-11-21 15:38:19
通常我會深入研究一下,但是我擔心現在沒有時間。其他一些靈魂可能會進入。但至少我想讓你知道源代碼現在已公開可用,並且易於在Github上訪問(本週僅在Git上發佈) – 2014-11-21 15:47:48