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?