参考问题: Unable to get document page name for
我已经尝试过Sven提供的解决方案,但我们仍然遇到同样的错误。 应用程序仅通过浏览器访问。
12/14/15 2:30 PM: Exception Thrown
Context Path: /db/common/itrs.nsf
com.ibm.xsp.FacesExceptionEx: Unable to get document page name for C8AF761CF554445D48257CC90007D9AD
at com.ibm.xsp.model.domino.DominoDocumentPageTransformer.transformPageName(DominoDocumentPageTransformer.java:69)
at com.ibm.xsp.application.ViewHandlerExImpl.convertVirtualPage(ViewHandlerExImpl.java:690)
at com.ibm.xsp.application.ViewHandlerExImpl._createViewRoot(ViewHandlerExImpl.java:490)
at com.ibm.xsp.application.ViewHandlerExImpl.createViewRoot(ViewHandlerExImpl.java:567)
at com.ibm.xsp.application.ViewHandlerExImpl.doCreateView(ViewHandlerExImpl.java:142)
at com.ibm.xsp.application.ViewHandlerEx.createView(ViewHandlerEx.java:90)
at com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:251)
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: com.ibm.xsp.FacesExceptionEx: Error while computing document form
at com.ibm.xsp.model.domino.DominoUtils.getXPagesForDocument(DominoUtils.java:603)
at com.ibm.xsp.model.domino.DominoDocumentPageTransformer.transformPageName(DominoDocumentPageTransformer.java:53)
... 21 more
Caused by: com.ibm.designer.domino.napi.NotesAPIException: Error finding special ID, Database=700 Special database object cannot be located
at com.ibm.designer.domino.napi.NotesDatabase.NGetSpecialNoteID(Native Method)
at com.ibm.designer.domino.napi.NotesDatabase.getSpecialNoteID(NotesDatabase.java:600)
at com.ibm.xsp.model.domino.DominoUtils.getXPagesForDocument(DominoUtils.java:540)
... 22 more
感谢您的期待。
答案 0 :(得分:4)
DominoDocumentPageTransformer 不会获取某些错误,例如如果文档不存在或者当前用户不可读。因为转换发生在页面转换期间(XPage引擎尝试解释URL并寻求打开XPage),所以会收到错误。
据我所知,您可以覆盖现有的 PageTransformer 并自行捕获错误。
package ch.hasselba.factory;
import com.ibm.xsp.model.domino.DominoDocumentPageTransformer;
import com.ibm.xsp.page.VirtualPageTransformer;
import javax.faces.context.FacesContext;
public class PageTransformer implements VirtualPageTransformer {
public boolean isVirtualPage(FacesContext fc, String pageName) {
return "/$$OpenDominoDocument.xsp".equals(pageName);
}
public String transformPageName(FacesContext fc, String pageName) {
String xspPage = "/ErrorPage.xsp";
try {
DominoDocumentPageTransformer transformer = new DominoDocumentPageTransformer();
xspPage = transformer.transformPageName(fc, pageName);
} catch (Exception e) {}
return xspPage;
}
}
当转换失败时,这将打开XPages ErrorPage.xsp 。
要激活Transformer,您必须创建文件
/WEB_INF/com.ibm.xsp.factories.properties
并添加行
PageTransformer = ch.hasselba.factory.PageTransformer