سؤال

Recently while using richtext field and ckeditor I started receiving following error while trying to run any kind of action that submits richtext value:

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

Anybody know what could possibly cause this kind of behaviour? I've got quite complex design with excesive use of extension library and this error appeared out of nowhere at some point. I cannot pin point what caused it because it was partially obscured by my logging code which unnecessarly called DominoDocument.getDocument(true).

After removing this call this error started to appear. Adding arbitral call DominoDocument.getDocument(true) to random 'rendered' attribute ssjs code seems to partially solve this problem (this is where the logging code was in the first place).

But still this is hack and I would like to know what went wrong in the begining.

This seems to be somehow connected to state of FieldValueHolder of DominoRichTextItem (its operation fields is set to REPLACE instead to ADD !?)

Can anybody help ?

هل كانت مفيدة؟

المحلول

I have found the root of the problem. I appears that if You remove formName attribute from document data source the side effect is this exception and disappearing attachments.

This regression was introducted to my application while adding some document response functionality (the form was computed in events so somebody threw away formName attribute). And what is worse the problem with attachments was obscured by some getDocument(true) call in debug code.

It would be nice if xsp compiler mentioned that formName is obligatory attribute ...

نصائح أخرى

If your calling REPLACE on a document that doesn't exist you would be getting an error and given it occurs after you removed the code to check whether to rendering it or not, really sounds as though the issue is the document doesn't exist.

Have you checked this out? also the easiest way to use a rich text item is just to bind it to a field

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

This might not always be possible but it gets over issues like this where custom code causes errors.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top