OpenNTF/org.openntf.domino

NotesException: Document is not from this collection

PatrickKwinten opened this issue · 0 comments

Remember, an issue is not the place to ask questions. StackOverflow should be used for questions. We have a Slack channel on OpenNTF Slack workspace for discussions.

Before you open an issue, please check if a similar issue already exists or has been closed.

Please include the following:

  • [ 12.0.1] Domino server version (relevant for runtime issues)
  • [ 12.0.1] Domino Designer version (relevant for compile-time issues)
  • [ 11.0.1] ODA version

I have another unexpected error with ODA and iterating through collections -> "Document is not from this collection". I include more from the message and he code calling. Not sure what I am doing incorrect? 2023-08-03T08:16:34 [WARNING]: lotus.domino.local.DocumentCollection.NgetNextDocument - Document is not from this collection

NotesException: Document is not from this collection

at lotus.domino.local.DocumentCollection.NgetNextDocument(Native Method)
at lotus.domino.local.DocumentCollection.getNextDocument(Unknown Source)
at org.openntf.domino.impl.DocumentCollection.getNextDocument(DocumentCollection.java:166)
at org.openntf.domino.iterators.DocumentCollectionIterator.next(DocumentCollectionIterator.java:67)
at org.openntf.domino.iterators.DocumentCollectionIterator.next(DocumentCollectionIterator.java:1)

at org.acme.projectx.dao.AttachmentDominoDAO.getAll(AttachmentDominoDAO.java:288)

DocumentCollection coll = vw.getAllDocumentsByKey(key + "#" + type, true);
for(Document doc:coll){
Attachment attachment = loadFromDocument(doc);
attachments.add(attachment);
}

in loadFromDocument I just read some fields from the document I pass in. nothing more