0
votes

My Xpage is redirecting the user to another page when processing is finished using the following code:

facesContext.getExternalContext().redirect("$$OpenDominoDocument.xsp?id="+unid+"&action=openDocument&framework=FA");

where "unid" is a valid documentUniqueID.

I have seen different use of this feature where the argument "&documentId=" exists.

If I use this argument the page is not loaded at all with no error anywhere.

If used with argument "id=" or open the Xpage directly: "ImportLog.xsp?id=valid unid..." I always get this error:

Unable to get document page name for null

with the following stackTrace:

com.ibm.xsp.FacesExceptionEx: Unable to get document page name for null
    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:1315)
        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:1299)
        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:350)
        com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:306)
        com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
    java.lang.NullPointerException
        com.ibm.xsp.model.domino.DominoUtils.isUNID(DominoUtils.java:435)
        com.ibm.xsp.model.domino.DominoUtils.getDocumentById(DominoUtils.java:444)
        com.ibm.xsp.model.domino.DominoUtils.getDocumentById(DominoUtils.java:461)
        com.ibm.xsp.model.domino.DominoDocumentPageTransformer.transformPageName(DominoDocumentPageTransformer.java:51)
        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:1315)
        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:1299)
        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:350)
        com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:306)
        com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)

The user running this has access to the document.

Using Domino 9 with the latest fixpacks

1
Here is related or duplicate question: stackoverflow.com/questions/16844120/…. And here is another one: stackoverflow.com/questions/19113756/…. There are few more. Did you check them out?Panu Haaramo
Yes, I did but I found they were n/a in my case.Mikael Andersson Wigander
Why is DominoDocumentPageTransformer not documented here? public.dhe.ibm.com/software/dw/lotus/Domino-Designer/JavaDocs/…Frantisek Kossuth

1 Answers

2
votes

Your code fails here:

/*      */   public static boolean isUNID(String id)
/*      */   {
/*  435 */     boolean unid = id.length() == 32;
/*  436 */     return unid;
/*      */   }

So your UNID is not passed into transformer. Parameter must be "documentId", not "id".

Add more info to find why it doesn't work for you.