我正在XPiNC中运行一个Xpages数据库,我希望将其用作"前端"到我们系统中的其他几个数据库。我将代码存储在此DB中并访问其他DB中的数据。
当我尝试在表单上执行简单的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
自定义控件中的代码如下:
<?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>
我从中获取数据的数据库不在Xpages中,但我认为这不重要。
答案 0 :(得分:2)
您的数据源定义databaseName="helpdesk.nsf"
- 在XPiNC中它表示数据库的本地副本。你需要使用完整格式,如Paul所说:
databaseName="yourservername!!helpdesk.nsf"
我建议使用以下方法对服务器进行参数化:
databaseName="#{database.server}!!helpdesk.nsf"
我认为验证器因无效数据源的“无数据”而失败。
答案 1 :(得分:1)
查看堆栈跟踪,它在Process Validations阶段失败 - 因此检查数据类型以进行验证/数据转换,并在DateTimeHelperRenderer上失败。它看起来像是指向computedField2。
有两种可能的解释:
if (view.isRenderingPhase()) {...}
包装计算将解决问题。如果不是这种情况,它会将错误移至渲染响应阶段。