Das Notes Forum

Domino 9 und frühere Versionen => ND8: Entwicklung => Thema gestartet von: ossigo am 30.06.10 - 13:28:16

Titel: Agent bricht ab mit "Notes error: Entry not found in index"
Beitrag von: ossigo am 30.06.10 - 13:28:16
Moin,
habe einen Agenten der sich zu jedem doc alle Antwortdokumente über eine view holt und diese in eine NotesViewEntryCollection packt. Über diese Collection mache ich eine Schleife und verarbeite diese Dokumente...
Der Agent läuft tadellos, bricht aber bei Verarbeitung von vielen Dokumente willkürlich mit nachfolgender Meldung ab.
AMgr: Agent ('ExportInfos' in 'meineDB.nsf') error message: Notes error: Entry not found in index ((dispActivities))
Abbruch dann bisher bei doc 3.000 - 15.000, mal so, mal so, irgendwo dazwischen...
Dabei glaube nicht, dass der Code das Problem ist (OK Fehlerhandling verbessern), sondern die view der Antwortdokumente wird gerade vom indexer aktualisiert o.ä. Kann sowas in der Art sein? Starte ich den Agenten anschließend sofort wieder, so läuft dieser wieder los als wäre nichts gewesen.
Der Agent fährt Exporte aus doc + Antwortdokumente ins Dateisystem und läuft für 15.000 Vaterdokumente + x Antwortdokumente ca. 1 Std und bricht dann irgendwann eben ab.


...
Dim viewReplyDocs As NotesView
Dim vc As NotesViewEntryCollection
...
While Not (doc Is Nothing)
Set viewReplyDocs = DB.GetView( "(dispActivities)" )
Set vc = viewReplyDocs.GetAllEntriesByKey( doc.Key(0), True)
If  Not (vc Is Nothing) Then
   For i = 1 To vc.Count
               
   'hole Dir das erste Element aus der View
   Set vcEntry = vc.GetNthEntry(i)
   Set ReplyDoc = vcEntry.Document
   'mach irgendwas damit
   Call Get_Anlagedatum(ReplyDoc)
               
                 Next
End If

Set doc = view.GetNextDocument(doc)
Wend

Jens
Titel: Re: Agent bricht ab mit "Notes error: Entry not found in index"
Beitrag von: pram am 30.06.10 - 13:40:04
als erstes sticht mir da ein getNth... ins Auge  :o
meide das. Siehe:

http://bobzblog.com/tuxedoguy.nsf/dx/getnth-revisited-helpful-function-or-spawn-of-the-devil

Gruß
Roland

Edit: Wenn du es auf getFirst/getNext umgebaut hast, bekommst du vermutlich folgenden Fehler wenn der Indexer vorbei schaut:
http://www.bleedyellow.com/blogs/erik/entry/8_5_1_fail_your_code_may_just_break19?lang=de_de
Titel: Re: Agent bricht ab mit "Notes error: Entry not found in index"
Beitrag von: ossigo am 01.07.10 - 16:43:58
Danke Roland,
gucke mir Deine Infos an.
Jens