在XPiNC的不同数据库中保存文档时发生Xpages错误

在XPiNC的不同数据库中保存文档时发生Xpages错误,xpages,Xpages,我正在XPiNC中运行一个Xpages数据库,我想将其用作系统中其他几个数据库的“前端”。我将把代码存储在这个数据库中,并访问其他数据库中的数据 当我试图对表单执行简单的CRUD操作时,我得到了一个无法解释的错误 6/22/15 4:51 PM: Exception Thrown Context Path: /xsp/<SERVER>NetworkHome.nsf Page Name: /xpFormHelpDesk.xsp javax.faces.FacesException

我正在XPiNC中运行一个Xpages数据库,我想将其用作系统中其他几个数据库的“前端”。我将把代码存储在这个数据库中,并访问其他数据库中的数据

当我试图对表单执行简单的CRUD操作时,我得到了一个无法解释的错误

6/22/15 4:51 PM: Exception Thrown
Context Path: /xsp/<SERVER>NetworkHome.nsf
Page Name: /xpFormHelpDesk.xsp
javax.faces.FacesException
    at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(Unknown Source)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(Unknown Source)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
    at com.ibm.xsp.controller.FacesControllerImpl.execute(Unknown Source)
    at com.ibm.xsp.webapp.FacesServlet.serviceView(Unknown Source)
    at com.ibm.xsp.webapp.FacesServletEx.serviceView(Unknown Source)
    at com.ibm.xsp.webapp.FacesServlet.service(Unknown Source)
    at com.ibm.xsp.webapp.FacesServletEx.service(Unknown Source)
    at com.ibm.xsp.webapp.DesignerFacesServlet.service(Unknown Source)
    at com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(Unknown Source)
    at com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(Unknown Source)
    at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(Unknown Source)
    at com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(Unknown Source)
    at com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(Unknown Source)
    at com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(Unknown Source)
    at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(Unknown Source)
    at com.ibm.domino.xsp.module.nsf.NSFService.access$0(Unknown Source)
    at com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
    at com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    at com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceThread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at com.ibm.xsp.renderkit.dojo.DateTimeHelperRenderer._getConvertedValue(Unknown Source)
    at com.ibm.xsp.renderkit.dojo.DateTimeHelperRenderer.getConvertedValue(Unknown Source)
    at com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.getConvertedValue(Unknown Source)
    at javax.faces.component.UIInput.getConvertedValue(Unknown Source)
    at com.ibm.xsp.component.UIInputEx.getConvertedValue(Unknown Source)
    at javax.faces.component.UIInput.validate(Unknown Source)
    at javax.faces.component.UIInput.executeValidate(Unknown Source)
    at javax.faces.component.UIInput.processValidators(Unknown Source)
    at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
    at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
    at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
    at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
    at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
    at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
    at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
    at com.ibm.xsp.component.UIDataPanelBase.processValidators(Unknown Source)
    at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
    at com.ibm.xsp.component.UIDataPanelBase.processValidators(Unknown Source)
    at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
    at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
    at com.ibm.xsp.component.UIDataPanelBase.processValidators(Unknown Source)
    at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
    at com.ibm.xsp.component.UIDataPanelBase.processValidators(Unknown Source)
    at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
    at com.ibm.xsp.extlib.component.layout.UIVarPublisherBase.processValidators(Unknown Source)
    at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
    at com.ibm.xsp.component.UIDataPanelBase.processValidators(Unknown Source)
    at javax.faces.component.UIForm.processValidators(Unknown Source)
    at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
    at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
    at javax.faces.component.UIViewRoot.processValidators(Unknown Source)
    at com.ibm.xsp.component.UIViewRootEx._processValidators(Unknown Source)
    at com.ibm.xsp.component.UIViewRootEx.processValidators(Unknown Source)
    ... 25 more
6/22/15下午4:51:引发异常
上下文路径:/xsp/NetworkHome.nsf
页面名称:/xpFormHelpDesk.xsp
javax.faces.FacesException
位于com.sun.faces.lifecycle.ProcessValidationsPhase.execute(未知源)
位于com.sun.faces.lifecycle.LifecycleImpl.phase(未知源)
位于com.sun.faces.lifecycle.LifecycleImpl.execute(未知源)
位于com.ibm.xsp.controller.FacesControllerImpl.execute(未知源)
位于com.ibm.xsp.webapp.FacesServlet.serviceView(未知源)
位于com.ibm.xsp.webapp.FacesServletEx.serviceView(未知源)
位于com.ibm.xsp.webapp.FacesServlet.service(未知源)
位于com.ibm.xsp.webapp.FacesServletEx.service(未知源)
位于com.ibm.xsp.webapp.DesignerFacesServlet.service(未知源)
位于com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(未知源)
位于com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(未知源)
位于com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(未知源)
位于com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(未知源)
位于com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(未知源)
位于com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(未知源)
位于com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(未知源)
位于com.ibm.domino.xsp.module.nsf.NSFService.access$0(未知源)
位于com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(未知源)
位于com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(未知源)
位于java.util.concurrent.FutureTask$Sync.innerRun(未知源)
位于java.util.concurrent.FutureTask.run(未知源)
位于java.util.concurrent.ThreadPoolExecutor$Worker.runTask(未知源)
位于java.util.concurrent.ThreadPoolExecutor$Worker.run(未知源)
位于java.lang.Thread.run(未知源)
位于com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceThread.run(未知源)
原因:java.lang.NullPointerException
位于com.ibm.xsp.renderkit.dojo.DateTimeHelperRenderer.\u getConvertedValue(未知源)
位于com.ibm.xsp.renderkit.dojo.DateTimeHelperRenderer.getConvertedValue(未知源)
位于com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.getConvertedValue(未知源)
位于javax.faces.component.UIInput.getConvertedValue(未知源)
位于com.ibm.xsp.component.UIInputEx.getConvertedValue(未知源)
位于javax.faces.component.UIInput.validate(未知源)
位于javax.faces.component.UIInput.executeValidate(未知源)
位于javax.faces.component.UIInput.processValidators(未知源)
位于javax.faces.component.UIComponentBase.processValidators(未知源)
位于javax.faces.component.UIComponentBase.processValidators(未知源)
位于javax.faces.component.UIComponentBase.processValidators(未知源)
位于javax.faces.component.UIComponentBase.processValidators(未知源)
位于javax.faces.component.UIComponentBase.processValidators(未知源)
位于javax.faces.component.UIComponentBase.processValidators(未知源)
位于javax.faces.component.UIComponentBase.processValidators(未知源)
位于com.ibm.xsp.component.UIDataPanelBase.processValidators(未知源)
位于javax.faces.component.UIComponentBase.processValidators(未知源)
位于com.ibm.xsp.component.UIDataPanelBase.processValidators(未知源)
位于javax.faces.component.UIComponentBase.processValidators(未知源)
位于javax.faces.component.UIComponentBase.processValidators(未知源)
位于com.ibm.xsp.component.UIDataPanelBase.processValidators(未知源)
位于javax.faces.component.UIComponentBase.processValidators(未知源)
位于com.ibm.xsp.component.UIDataPanelBase.processValidators(未知源)
位于javax.faces.component.UIComponentBase.processValidators(未知源)
位于com.ibm.xsp.extlib.component.layout.UIVarPublisherBase.processValidators(未知源)
位于javax.faces.component.UIComponentBase.processValidators(未知源)
位于com.ibm.xsp.component.UIDataPanelBase.processValidators(未知源)
位于javax.faces.component.UIForm.processValidators(未知源)
位于javax.faces.component.UIComponentBase.processValidators(未知源)
位于javax.faces.component.UIComponentBase.processValidators(未知源)
位于javax.faces.component.UIViewRoot.processValidators(未知源)
位于com.ibm.xsp.component.UIViewRootEx.\u processValidators(未知源)
位于com.ibm.xsp.component.UIViewRootEx.processValidators(未知源)
... 25多
自定义控件中的代码如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<xp:view
    xmlns:xp="http://www.ibm.com/xsp/core"
    xmlns:xe="http://www.ibm.com/xsp/coreex"
    xmlns:xc="http://www.ibm.com/xsp/custom">
    <xp:this.data>
        <xp:dominoView
            var="view1"
            databaseName="helpdesk.nsf"
            viewName="My Tickets">
            <xp:this.categoryFilter><![CDATA[#{javascript:@Name("[CN]",session.getEffectiveUserName()) + "Open"}]]></xp:this.categoryFilter>
        </xp:dominoView>
    </xp:this.data>
    <xe:widgetContainer
        id="widgetContainer1"
        style="width:800.px;font-weight:bold;font-size:10pt;margin-left:10.0px"
        dropDownRendered="false"
        titleBarText="My Help Desk Tickets"
        titleBar="true"
        type="sidebar"
        collapsible="false">
        <xp:panel>
            <xp:repeat
                id="repeat1"
                var="rowData"
                indexVar="repeatIndex"
                value="#{view1}">
                <xp:this.facets>
                    <xp:text
                        disableTheme="true"
                        xp:key="header"
                        escape="false">
                        <xp:this.value><![CDATA[<table class='lotusTable repeatRowColors' border='0' cellspacing='0' cellpadding='0'>
<tr class ='lotusFirst lotusSort scope='col'>
<th class ='lotusBold'>Requester</th>
<th class ='lotusBold'>Subject</th>
<th class ='lotusBold'>Date</th>
</tr>
</thead>]]></xp:this.value>
                    </xp:text>
                    <xp:text
                        disableTheme="true"
                        xp:key="footer"
                        escape="false">
                        <xp:this.value><![CDATA[</table>]]></xp:this.value>
                    </xp:text>
                </xp:this.facets>
                <xp:tr
                    id="rowDataContainer">
                    <xp:td
                        style="width:125.00px;min-width:125px;max-width:125px;font-size:10pt">
                        <xp:text
                            escape="true"
                            id="computedField3">
                            <xp:this.value><![CDATA[#{javascript:rowData.getColumnValue("$0");}]]>
                            </xp:this.value>
                        </xp:text>
                    </xp:td>
                    <xp:td
                        style="width:250px;min-width:250px;max-width:250px font-size:10pt">
                        <xp:link
                            escape="true"
                            id="link1">
                            <xp:this.text><![CDATA[#{javascript:rowData.getColumnValue("Subject2")}]]></xp:this.text>
                            <xp:eventHandler
                                event="onclick"
                                submit="true"
                                refreshMode="complete">
                                <xp:this.action>
                                    <xp:openPage
                                        name="/xpFormHelpDesk.xsp"
                                        target="openDocument">
                                        <xp:this.documentId><![CDATA[#{javascript:rowData.getDocument().getUniversalID()}]]></xp:this.documentId>
                                    </xp:openPage>
                                </xp:this.action>
                            </xp:eventHandler>
                        </xp:link>
                    </xp:td>
                    <xp:td
                        style="font-size:10pt">
                        <xp:text
                            escape="true"
                            id="computedField2">
                            <xp:this.value><![CDATA[#{javascript:rowData.getColumnValue("$1");}]]>
                            </xp:this.value>
                            <xp:this.converter>
                                <xp:convertDateTime
                                    type="date"></xp:convertDateTime>
                            </xp:this.converter>
                        </xp:text>
                    </xp:td>
                </xp:tr>
            </xp:repeat>
        </xp:panel>
    </xe:widgetContainer>
</xp:view>


查看堆栈跟踪,它在流程验证阶段失败-因此检查验证/数据转换的数据类型,并在DateTimeHelperRenderer上失败。它看起来像是指向computedField2

有两种可能的解释:

  • 其中一个视图条目在$1列中的值无法转换为日期。这听起来是最有可能的
  • 您遇到了我在博客中提到的问题,部分刷新和行数据源不可用。如果是这种情况,使用
    If(view.isRenderingPhase()){…}
    包装计算将解决问题。如果不是这样,它将把错误移到渲染响应阶段

  • 查看堆栈跟踪,它是f
    databaseName="yourservername!!helpdesk.nsf"
    
    databaseName="#{database.server}!!helpdesk.nsf"