Quantcast
Channel: XPages and more
Viewing all articles
Browse latest Browse all 628

Troubleshooting HCL Notes - Common Error and Event Logging

$
0
0

In my previous blog posts regarding the new blog series Troubleshooting HCL Notes, the error messages Unable to Read Rollover Values from View, Invalid Collection Data was Detected, DAOS Prune - Deleted 0 objects and completed with error: (685) Document attachment, The address book does not contain a cross certificate capable of validating the public key is invalid, Server Task Agent Manager on Server is No Longer Responding and HCL Nomad - Server is not reachablewere explained in more detail. We also briefly looked at the Domino Configuration Tuner (DCT) and the Domino Domain Monitor (DDM). In this blog post a quick look at a very helpful tool for troubleshooting HCL Notes applications, the OpenNTF OpenLog application. The OpenNTF OpenLog application is an application with script libraries that can be shared with all of the used Notes applications to provide common error and event logging across in a Domino environment. 

9. OpenNTF OpenLog Application

The OpenNTF OpenLog application works with both LotusScript and Java agents and Librarie and requires only a single function/method call with no parameters. Logging Notes application errors has never been easier or more efficient. Yes, I know the application is 11 years old. But it still works great and I personally still use this application on a daily basis.The application can be downloaded from the OpenNTF site, OpenLog. The application comes with extensive documentation that shows step-by-step how to initially set up the application within a Notes Domino environment as well as use it within the various Notes applications.

The setup of the OpenLog application is quite simple. In order to log all errors and events from the various Notes applications into a central OpenLog databases on the Domino sever, the Script Library OpenLogFunctions must first be copied from the OpenNTF OpenLog application to the relevant Notes applications. After copying the OpenLogFunctions Script Library to the respective Notes application (s), the most important next step is to change the logDbName variable.
As a next step, some minor adjustments are needed regarding the existing LotusScript code to use the logging functions. In the existing Agents and Script Libraries (Functions, Subroutines) add Use "OpenLogFunctions" (Options). In our own Notes Domino environment we mainly use Stack Traces in the functions / subs / methods by calling the AddToStackTrace function in the error handling block (instead of LogError) and then allowing the procedure to terminate instead of calling an Exit or a Resume statement. For more information see the Using This Application documentation in de OpenLog application. If you need help to set this up you can send me a message.
Don't forget to check out the Mail library as well. The MailFunctions script library (for LotusScript) makes it easy to create and send e-mail in an agent. It's used in the Notification functions but you can use it in plenty of other places.
Below is a basic example of using the OpenLogFunction Library and Mailfunction Library in LotusScript to send a notification email.

Sub sendEmailNotification(doc As NotesDocument)
' error handler
On Error GoTo errorHandler
' init
Dim s As New NotesSession
Dim md As MailData
Dim nam As NotesName
' create name
Set nam = s.CreateName( doc.FIELDNAME(0) )
' send email
md.Subject = "SUBJECT"
md.From = "FROM"
md.bodyText = "BODYTEXT"
md.priority = PRIORITY_NORMAL
md.mood = MOOD_FYI
md.sendto = nam.Common
'md.cc
'md.bcc
'md.attFiles
Set md.links = doc
'md.bodyRTF
' send message
Call SendMail(md)
Exit Sub
errorHandler:
Call AddToStackTrace()
End Sub

In the next blog posts more common Notes error messages and their solutions and some tools that can be very helpful in troubleshooting these error messages. So stay tuned!

Viewing all articles
Browse latest Browse all 628

Trending Articles