?
Solved

Weird error message: "Notes error: Network protocol error: message from server is too small"

Posted on 2005-04-06
10
Medium Priority
?
1,949 Views
Last Modified: 2013-12-18
Hi,
When executing a LotusScript agent I get the following error message :
Notes error: Network protocol error: message from server is too small

The line where the error occurs is the following :
Set vwEntryCollection = vw.AllEntries

Here's the complete script of the agent :
Sub Initialize
      REM ==================================================================================
      REM DEFINE ERROR ROUTINE
      REM ==================================================================================
      On Error Goto ErrorHandler
      
      REM ==================================================================================
      REM DECLARATIONS
      REM ==================================================================================
      REM *** Notes objects ***
      Dim session As New NotesSession
      Dim ws As New NotesUIWorkspace
      Dim docDialog As NotesDocument
      Dim uidoc As NotesUIDocument
      Dim dc As NotesDocumentCollection
      Dim vw As NotesView
      Dim vwEntryCollection As NotesViewEntryCollection
      
      REM *** Word objects ***
      Dim objWordDoc As Variant
      
      REM *** rtlib objects ***
      Dim rtlibParagraph As rtextParagraph
      
      REM *** Script processing variables ***
      Dim strStyle As String
      Dim lngTables As Long
      Dim intRows As Long, intColumns As Long
      Dim i As Integer, j As Integer
      Dim rc As Integer
      Dim strPathWordDoc As String
      Const FILEMASK$ = "Word Documents|*.doc"
      
      REM ==================================================================================
      REM INITIALIZE
      REM ==================================================================================
      Set cfg = New ConfigurationProfile
      Call Logging("Started")
      Set db = session.CurrentDatabase
      Set objWordDoc = Nothing
      Call InitStyles
      
      REM ==================================================================================
      REM Get Document to import and category
      REM ==================================================================================
      Set docDialog = db.CreateDocument
      docDialog.Form = "dlgSelectCategory"
      rc = ws.DialogBox("dlgSelectWordDoc", True, True, False, False, False, False, "Selecteer te importeren bestand", docDialog, True, False)
      If Not rc Or docDialog.importFile(0) = "" Then
            Exit Sub
      End If
      strPathWordDoc = docDialog.importFile(0)
      
      REM ==================================================================================
      REM OPEN WORD DOCUMENT
      REM ==================================================================================
      Set objWord = CreateObject("word.application")
      objWord.Application.Visible = False ' True 'activeer deze lijn bij problemen in word macro
      'disable AutoMacros
      objWord.Application.WordBasic.DisableAutoMacros 1
      Set objWordDoc = objWord.Documents.Open(strPathWordDoc)
      
      REM ===================================================================================
      REM REMOVE TABLE OF CONTENTS FROM THE DOCUMENT
      REM ===================================================================================
      Forall toc In objWord.ActiveDocument.TablesOfContents
            toc.Delete
      End Forall
      
      REM ==================================================================================
      REM CLEANUP PREVIOUS IMPORT
      REM ==================================================================================
      Set vw = db.GetView("vwPrep")
      Set vwEntryCollection = vw.AllEntries
      If vwEntryCollection.Count > 0 Then Call vwEntryCollection.RemoveAll(True)
      
      REM ==================================================================================
      REM IMPORT DOCUMENT
      REM ==================================================================================
      rc = ImportDocument(objWordDoc)
      If rc = False Then
            Messagebox "Er was een probleem tijdens het importeren van '" & strPathWordDoc & "'"
            Goto CleanupObjects
      End If
      
      REM ==================================================================================
      REM SHOW RESULT IN DIALOG BOX
      REM ==================================================================================
      Set docDialog = db.CreateDocument
      rc = ws.DialogBox("dlgShowPrep", True, True, False, False, False, False, "Resultaat", docDialog, True, False)
      
      REM ==================================================================================
      REM CLEANUP
      REM ==================================================================================
CleanupObjects:
      If Not objWordDoc Is Nothing Then
            Call objWordDoc.Close(wdDoNotSaveChanges)
            Set objWordDoc = Nothing
      End If
      If Not objWord Is Nothing Then
            'enable AutoMacros
            objWord.Application.WordBasic.DisableAutoMacros 0
            Call objWord.Application.Quit (True)
            Set objWord = Nothing
      End If
      Call Logging("Ended")
      Call cfg.close
      Exit Sub
      
      REM ==================================================================================
      REM ERROR HANDLER
      REM ==================================================================================
ErrorHandler:
      Call Logging("Error: " & Error$ & " in line " & Erl)
      Messagebox "Error: " & Error$ & " in line " & Erl & " - Error number: " & Err
      If Erl < 95 Then
            Resume CleanupObjects
      Else
            Call Logging("Ended with error")
            Exit Sub
      End If
End Sub

When I try to execute the agent there's no problem. I then ask a user with the problem to try. He/she gets the error.
I then try again and get the same error.

Does any of you have an idea what could be causing this problem ?
I'm developing in R5, using designer version 5.0.10
End users where the error first appeared are using version 5.0.5 clients.

I'd be grateful for any insight you guys/girls can give me.
0
Comment
Question by:Jean Marie Geeraerts
  • 4
  • 2
  • 2
8 Comments
 
LVL 31

Expert Comment

by:qwaletee
ID: 13716302
I've only seen a couple of references to this, relating to networks with multiple segments, where there may be different packet sizes allowed betwen them.  This can cause packet fragmentation, and eventually, invalid content, and is especially problematic when you have multiple topologies between you and the server (e.g., Ethernet+Token Ring, IP+ATM, etc.).  I'm not very knowledgable.
0
 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 13716325
Might be a reason. We do have a mixed network environment here with everything you can imagine: ethernet, token ring, atm, ...
Don't know about the packet sizes (no longer occupied with the physical network).
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 13716404
I have seen in one instance where the view contains some replication/save conflicts..

As alternate don't use viewentrycollection.. use the good old native method of looping thru the view...

~Hemanth
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 13716424
Problem with looping through the view is that a document can be open in preview pane and it will return error message 'Unable to delete document while open in UI' (or something like that).

The original line of code was :
Call vw.AllEntries.RemoveAll(True)

This returned an error 'Entry not found in index', so I coded around to first check for existing entries and then removing the whole collection.
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 1000 total points
ID: 13716482
I would suggest you mark them for deletion rather than deleting on fly..and move it out of the views by using this flag.

Advantages
1. It is safe and no need to give user delete access
2. Quicker
3. Rollback or retreive docs is easier before a nightly agent or weekly agent comes and clears up the trash
0
 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 13716511
This sounds interesting. Will have to look into that.
Thanks, will get back to you as soon as I've managed to try and test a few things.
0
 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 13716613
Stupid question: is there a script equivalent to the @command([MoveToTrash]) method to mark the document for deletion? And how do I actually remove the documents marked for deletion from the view so they won't be used in another script walking through the view?
0
 
LVL 31

Assisted Solution

by:qwaletee
qwaletee earned 1000 total points
ID: 13719015
Depending on if you have soft deletions on or not, and what version of that, you can just 'puInFolder("($Trash)") -- or.putAllInFolder for a collection
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question