1
votes

I have a weird problem with rich text items in a XPage application.

The XPage has three rich text items each with the CKEditor. Normally saving a document is not a problem. But with some documents an error occurs.

Caused by: NotesException: Item [itemname] already exists
at lotus.domino.local.Document.createMIMEEntity(Unknown Source)
at com.ibm.xsp.model.domino.wrapped.DominoRichTextItem.startMimeItem(DominoRichTextItem.java:1555)
at com.ibm.xsp.model.domino.wrapped.DominoRichTextItem.updateRichTextItem(DominoRichTextItem.java:1523)
at com.ibm.xsp.model.domino.wrapped.DominoDocument.applyChangesToDoc(DominoDocument.java:1695)
at com.ibm.xsp.model.domino.wrapped.DominoDocument.applyChanges(DominoDocument.java:1648)
at com.ibm.xsp.model.domino.wrapped.DominoDocument.save(DominoDocument.java:1040)
at com.ibm.xsp.model.domino.DominoDocumentData.doSaveDocument(DominoDocumentData.java:567)
... 39 more

I figured out that this likely happens if one item is rich text while all the other items are stored as MIME. My guess is that somehow Domino recognizes the rich text item as MIME. Jake Howlett had a similar problem: Why Might Notes Consider a MIME Field To Be Rich Text? http://www.codestore.net/store.nsf/unid/BLOG-20120131-0656 The only difference is that it is the other way around.

Setting the option "Store as MIME" will only help for new documents. I have to find a solution for the few documents which throws an error.

Any suggestions?

1
Is it possible that the content of the field is somehow causing the error? If it's happening on some documents, but not all, I'd be inclined to believe that it may be a conversion error in the content.Aaron Brake
Not sure if it works, but have you tried re-saving the documents in the Notes Client after changing to "Store as MIME"? If you're lucky, it will be converted.Tommy Valand

1 Answers

0
votes

Speak after me: There is no RichText on the Internet, it is a ghost of Christmas past, there's only Mime.

Joke aside: your best course of action probably is to run an agent and convert the remaining RichText fields to Mime. This also gets rid of conversion inaccuracies you might encounter in the round tripping Mime - RichText - Mime