English 中文(简体)
导致 DominoDocument. setValue () 错误的 Richtext 字段
原标题:Richtext field causing DominoDocument.setValue() error

最近在使用 richtext 字段和 ckiditor 时, 我开始收到错误, 试图运行任何提交 richtext 价值的行动 :

com.ibm.xsp.FacesExceptionEx: Notes exception thrown while calling DominoDocument.setValue() on field rt
at com.ibm.xsp.model.domino.wrapped.DominoDocument.setValue(DominoDocument.java:1465)
at com.ibm.xsp.el.PropertyResolverImpl.setValue(PropertyResolverImpl.java:206)
at com.sun.faces.el.impl.ArraySuffix.setValue(ArraySuffix.java:201)
at com.sun.faces.el.impl.ComplexValue.setValue(ComplexValue.java:180)
at com.sun.faces.el.ValueBindingImpl.setValue(ValueBindingImpl.java:206)
at com.ibm.xsp.component.UIInputEx.updateModel(UIInputEx.java:573)
at javax.faces.component.UIInput.processUpdates(UIInput.java:484)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at com.ibm.xsp.component.UIDataPanelBase.processUpdates(UIDataPanelBase.java:351)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at com.ibm.xsp.component.UIDataPanelBase.processUpdates(UIDataPanelBase.java:351)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at com.ibm.xsp.component.UIDataPanelBase.processUpdates(UIDataPanelBase.java:351)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at com.ibm.xsp.component.UIDataPanelBase.processUpdates(UIDataPanelBase.java:351)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at com.ibm.xsp.component.UIDataPanelBase.processUpdates(UIDataPanelBase.java:351)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at com.ibm.xsp.component.UIDataPanelBase.processUpdates(UIDataPanelBase.java:351)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at com.ibm.xsp.component.UIDataPanelBase.processUpdates(UIDataPanelBase.java:351)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at javax.faces.component.UIForm.processUpdates(UIForm.java:222)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244)
at javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:406)
at com.ibm.xsp.component.UIViewRootEx._processUpdates(UIViewRootEx.java:1513)
at com.ibm.xsp.component.UIViewRootEx.processUpdates(UIViewRootEx.java:1492)
at com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(UpdateModelValuesPhase.java:98)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:96)
at com.ibm.xsp.controller.FacesControllerImpl.execute(FacesControllerImpl.java:250)
at com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:223)
at com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:200)
at com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
at com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:137)
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:1267)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:847)
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:1251)
at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:598)
at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:421)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:341)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:297)
at com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)

Caused by: NotesException: Note item not found
at lotus.domino.local.Document.closeMIMEEntities(Unknown Source)
at com.ibm.xsp.model.domino.wrapped.DominoRichTextItem.closeMIMEEntities(DominoRichTextItem.java:2531)
at com.ibm.xsp.model.domino.wrapped.DominoDocument.getRichTextField(DominoDocument.java:1979)
at com.ibm.xsp.model.domino.wrapped.DominoDocument.createRTFieldWithValue(DominoDocument.java:1998)
at com.ibm.xsp.model.domino.wrapped.DominoDocument.setValue(DominoDocument.java:1382)
... 60 more

有人知道什么可能导致这种行为吗?我设计得相当复杂,过度使用扩展图书馆,这个错误在某个时候突然出现。 我不能指出是什么原因,因为它被我的伐木代码部分掩盖了,这个代码不必要地被称为DominoDocument.getDocument(真)。

删除此呼叫后, 此错误开始出现 。 将仲裁电话 DominoDocument. getDocument( true) 添加到随机设定的属性 ssjs 代码似乎可以部分解决这个问题( 这是记录代码最初的位置 ) 。

但是,这仍然是黑客 我想知道在开始的时候出了什么问题。

这似乎在某种程度上与DominoRichTextTextItem的FieldValueHolder(其操作字段设置为 REPLACE, 而不是 ADD ) 的状态相关。

有人能帮忙吗?

最佳回答

我找到了问题的根源。 我似乎发现, 如果您从文档数据源中删除窗体属性Name, 副作用就是这个例外, 并正在消失附件 。

此回归被介绍到我的应用程序中, 同时添加了一些文档响应功能( 表格是在一些事件中计算的, 使某人丢弃了窗体Name属性 ) 。 更糟糕的是, 附加物的问题被一些调试代码中的 makeDocument( true) 调用所掩盖 。

如果 xsp 编译者提到表单Name 是强制性属性...

问题回答

如果您在不存在的文档上调用 REPLACE, 您将会收到错误, 并且考虑到它会在您删除代码以检查是否将其显示后发生, 听起来真的好像问题在于文档不存在 。

您检查过这个吗? 使用内容丰富的文本项目最简单的方法就是将它绑在字段上

e.g.  value="#{dominoDoc.body}"

这也许并不总是可能的,但它会克服一些问题,例如自定义代码造成错误的问题。





相关问题
What is the meaning of the small "6" on some Domino agents?

Some agents in an ancient Lotus Notes application has a difference in agent-enabled behaviour that I cannot explain: This is the agent list read in R7.0.3: Enabled agents in R7, notice the small &...

Is Interop.Domino dll thread safe?

I am using Interop.Domino dll version 1.2 in c# application, and using multithreading to access multiple NSF file at same time by creating new session for each thread created (Max 5 threads at a time)....

热门标签