XPages Console Error: Unable to get document page name for

无人久伴 提交于 2019-12-12 06:06:22

问题


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.


回答1:


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




回答2:


I know that you've probably solved the problem you had by now! But I've had the same issue and was hunting around trying to find the solution, so wanted to add my findings to this thread.

The reason I saw this error was because users were trying to open a document from a doc link within an email and there was no default form specified in that database.



来源:https://stackoverflow.com/questions/34347595/xpages-console-error-unable-to-get-document-page-name-for

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!