XPages 控制台错误:无法获取文档页面名称 [英] XPages Console Error: Unable to get document page name for

查看:26
本文介绍了XPages 控制台错误:无法获取文档页面名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

参考问题:无法获取文档页面名称

我已经尝试了 Sven 给出的解决方案,但我们仍然遇到同样的错误.应用程序只能通过浏览器访问.

<预><代码>15 年 12 月 14 日下午 2:30:抛出异常上下文路径:/db/common/itrs.nsfcom.ibm.xsp.FacesExceptionEx:无法获取 C8AF761CF554445D48257CC90007D9AD 的文档页面名称在 com.ibm.xsp.model.domino.DominoDocumentPageTransformer.transformPageName(DominoDocumentPageTransformer.java:69)在 com.ibm.xsp.application.ViewHandlerExImpl.convertVirtualPage(ViewHandlerExImpl.java:690)在 com.ibm.xsp.application.ViewHandlerExImpl._createViewRoot(ViewHandlerExImpl.java:490)在 com.ibm.xsp.application.ViewHandlerExImpl.createViewRoot(ViewHandlerExImpl.java:567)在 com.ibm.xsp.application.ViewHandlerExImpl.doCreateView(ViewHandlerExImpl.java:142)在 com.ibm.xsp.application.ViewHandlerEx.createView(ViewHandlerEx.java:90)在 com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:251)在 com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:157)在 com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)在 com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)在 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:1335)在 com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:853)在 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:1319)在 com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:662)在 com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:482)在 com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:357)在 com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:313)在 com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)引起:com.ibm.xsp.FacesExceptionEx:计算文档表单时出错在 com.ibm.xsp.model.domino.DominoUtils.getXPagesForDocument(DominoUtils.java:603)在 com.ibm.xsp.model.domino.DominoDocumentPageTransformer.transformPageName(DominoDocumentPageTransformer.java:53)……还有 21 个引起:com.ibm.designer.domino.napi.NotesAPIException:查找特殊 ID 时出错,数据库=700 无法定位特殊数据库对象在 com.ibm.designer.domino.napi.NotesDatabase.NGetSpecialNoteID(本机方法)在 com.ibm.designer.domino.napi.NotesDatabase.getSpecialNoteID(NotesDatabase.java:600)在 com.ibm.xsp.model.domino.DominoUtils.getXPagesForDocument(DominoUtils.java:540)... 22 更多

谢谢你的期待.

解决方案

DominoDocumentPageTransformer 不会获取一些错误,例如如果文档不存在或当前用户不可读.由于转换发生在页面转换期间(XPage 引擎尝试解释 URL 并寻求打开 XPage),您会收到错误.

据我所知,您可以覆盖现有的 PageTransformer 并自行捕获错误.

package ch.hasselba.factory;导入 com.ibm.xsp.model.domino.DominoDocumentPageTransformer;导入 com.ibm.xsp.page.VirtualPageTransformer;导入 javax.faces.context.FacesContext;公共类 PageTransformer 实现 VirtualPageTransformer {public boolean isVirtualPage(FacesContext fc, String pageName) {return "/$$OpenDominoDocument.xsp".equals(pageName);}public String transformPageName(FacesContext fc, String pageName) {String xspPage = "/ErrorPage.xsp";尝试 {DominoDocumentPageTransformer 转换器 = new DominoDocumentPageTransformer();xspPage =transformer.transformPageName(fc, pageName);} catch (Exception e) {}返回 xspPage;}}

这会在转换失败时打开 XPage ErrorPage.xsp.

要激活 Transformer,您必须创建文件

/WEB_INF/com.ibm.xsp.factories.properties

并添加行

PageTransformer=ch.hasselba.factory.PageTransformer

请参阅此处:http://hasselba.ch/blog/?p=1028

Referring to Question: Unable to get document page name for

I have tried the solution given by Sven, but we still getting same error. Applications are access via browsers only.


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

Thank you in anticipation.

解决方案

The DominoDocumentPageTransformer doesn't fetch some errors, e.g. if the document does not exist or is not readable for the current user. Because the transformation happens during the page convertion (the XPages engine tries to interpret the URL and seeks for the XPage to open), you receive an error.

As far as I know you can overwrite the existing PageTransformer and catch the error for yourself.

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;
    }
}

This opens the XPages ErrorPage.xsp when the transformation fails.

To activate the Transformer, you have to create the file

/WEB_INF/com.ibm.xsp.factories.properties

and add the line

PageTransformer=ch.hasselba.factory.PageTransformer

see here: http://hasselba.ch/blog/?p=1028

这篇关于XPages 控制台错误:无法获取文档页面名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆