Fixes for a Few Lotus Notes Issues

June 1, 2011

A few years ago, I was an IBM employee and was introduced to their incredibly complex and broken groupware solution known as Lotus Notes/Lotus Domino.

You have to understand that Lotus Notes and Domino are an excellent system for rapidly developing and sharing database applications across large networks. IMHO there was some point where IBM needed a groupware system for handling stuff like messaging, calendars, meetings, contact lists and so on. Storing this information in database files is the most efficient way (when done right) for storing and retrieving that kind of data (Microsoft Exchange and Outlook do this and are extremely fast). Since Lotus Notes/Domino was already a capable database system, they shoe-horned the groupware features onto it. The bolted on features do work but they have many issues. They have continued to bolt on features as newer things (like internet e-mail, instant messaging, and web sites) have become more relevant, resulting in a lot of additional complexity. Although it often appears to be a huge mess, it’s configuration is very flexible and deep down in it’s design there some very intelligent features.

Over the years I learned quite a few little tricks which are quite handy and can make Notes less frustrating when you have to use it daily.

“An Error Occurred While Opening a Windows” When Notes is Launched

This error usually occurs when Lotus Notes is terminated unexpectedly from a crash or the user ending it’s task when it’s locked up. I’ve also seen it appear when Notes Minder (nminder.exe) has been loaded before the Notes (notes.exe) application itself.

Lotus Notes uses quite a few different executables other than just ‘notes.exe’ which work together in the background. When some are still left open from an older session this and other errors can pop up. I suspect that it is because of an important shared DLL which all of the Notes executables use.

Simply open Task Manager and kill off the Notes background processes (ntaskldr.exe nlnotes.exe). If the error persists kill off any other Notes processes, or just reboot the workstation.

Lotus Notes Opens and Immediately Exists Without and Error

The Notes.ini file in the Lotus Notes program folder (usually “C:\Program Files\IBM\Lotus\Notes”) contains the bulk of the core Lotus Notes client configuration (most of the user configuration is stored in separate NSD files). You can open this file up in a text editor like notepad.exe and edit it.

If there are any invalid characters that appear in the file before the “[Notes]” section header, the Notes application will not read the configuration file and will fail to work. Usually Windows Notepad will display a bunch of black boxes to indicate that the character is not part of the regular ASCII range (which Notes expects). Remove any invalid characters you can see, or often it’s better just to delete all of the file contents at the beginning of the file, up to and including the “[Notes]” header, and then just re-type it so there is no way it is corrupt.

Clearing Notes.ini to Set Lotus Notes Back to it’s Original Configuration

The Notes.ini file in the Lotus Notes program folder (usually “C:\Program Files\IBM\Lotus\Notes”) contains the bulk of the core Lotus Notes client configuration (most of the user configuration is stored in separate NSD files). You can open this file up in a text editor like notepad.exe and delete all but the first three or four lines so that it reads:

[Notes]
KitType=1
Directory=C:\Program Files\IBM\Lotus\Notes\Data
InstallType=2

The next time the Notes application is run, it will go through the initial  setup wizard and restore all of the deleted settings with fresh ones that will hopefully work properly. Note that user information like their mail, address book, workspace…even connection documents are all stored in separate NSD databases which are untouched and will be able to work again as soon as the wizard completes.

Create a New Connection Document Using the Server’s IP Address

If your connection documents are broken or if you notice that Lotus Notes is taking a long time searching for servers (by contacting other known servers) , you may have problems with corrupt connection documents.

It is easy to force Lotus Notes to create a new connection document. Bring up the open database dialog (CTRL-O) and paste the server’s IP address into the top (Look In) field. When you hit enter it will create a new set of correct connection documents for that server.

This also can work with servers that are connected to your Lotus Notes client via a passthru server. If the passthru is configured correctly, Notes can contact any of the other Domino servers behind the passthru and obtain the connection information for the server you want to create a connection document for.

Finding Missing Files Using “Add Documents” View

If you’re ever missing a file record that you know should be present in a database but you cannot see in the regular work views, you can always locate it under the “All Documents” view. If the file exists in the database it will appear under this view, you can view it’s properties to find the path if it’s been moved, or confirm if it’s not showing under the regular view (see the date issue below for an example). If it’s not there then it’s really been removed.

Improper Modification Dates on Databases (Future Date Issue)

Sometimes the dates on database files (especially e-mail boxes) become out of sync. When this happens, documents will not appear in the regular views because they have a delivery date which is in the future. They will become visible when the system date reaches the future date that Lotus Notes thinks is the present, however newer documents delivered in the present will continue to be delivered with a future date and will continue to be hidden.

You can spot it by checking the database properties. If it’s modification date is in the future, you have this problem. Database consistency checks (in the GUI or with nfixup.exe) will fail as a result of the bad dates.

I don’t recall the exact explanation of why this occurs, but it does happen in a few ways, and I remember it was often caused as a result of switching time zones under Windows, or from performing date adjustments while Lotus Notes is running. Lotus Notes probably maintains an internal time counter when it’s launched that goes out of sync with the actual system time.

Using NFIXUP.EXE to Perform Consistency Checks

Notes comes with a command line tool named NFIXUP.EXE in it’s program folder which can be used to manually perform consistency checks on database files. It requires the full path to the nsf file, and make sure Notes is closed before you use it.

Performing the check through the command line tools is much faster than checking the files in the Notes GUI, and it provides extra details about the problems fixed or any fatal errors. It sometimes has better success with fixing the files as well.

It should also be noted that templates and layouts are also regular database files, only with a different file extension, so they can be fixed with this tool as well.

Using NCOMPACT.EXE to Compact Databases

When you delete a record or series of items from a Notes database, it doesn’t actually remove the data or resize the database file. It most likely just marks the records or blocks as deleted in a bitmap. When it needs to copy new data into the database, it writes the new data into the blocks and space which were marked as deleted. This increases the performance of the database a lot because it doesn’t have to shift existing data blocks or resize the database file, it just fills the old blocks and updates a few pointers in an internal structure.

However, there may situations where the database file grows to a large size and remains that way, with only a small amount of it’s space actually being used for data. For example, your mail box may have a large number of messages and attachments which makes your mail file over 1GB in size. If you delete all of the messages and attachments, and only receive a couple of messages in the months afterward, you will still have a mail file over 1GB in size (even though it’s almost empty)! Compacting it will remove all of the extra blocks of space in the database which are empty and will never be used.

You can check the percentage of database space actually used against the database file size in the database properties, and compact it from here as well (if you have the permissions).

The command line tool NCOMPACT.EXE will also compact a provided database file, and is often faster at performing the operation from the command line (close Notes first).

Rebuilding Views and Indexes

Indexes speed up searching the database by and it’s beneficial to create one for all of your databases if you can. Indexes can become out-dated or corrupt causing problems. You can delete the old index (if corrupt or really old) and create a new one under the database properties.

Views also use their own indexes and these can also become corrupt and invalid. You can force them to be updated by pressing CTRL-SHIFT-F9.

Moving Records Between Databases With Cut and Paste

You can easily copy selected files/records or all of them into another database file using copy and paste. It is that easy! This is especially handy for doing manual archiving or backing up data from encrypted databases into other database files.

Corrupted Database Templates

This can be an issue when you are suddenly receiving strange errors related to variables or other Lotus Script elements while using the database layout, and it hadn’t been updated or reported the errors when used previously.

Replace the database template with a copy from server. Sometimes you may just have to use one of the generic ones that ships with Notes. Also remember to update the views again as well, since they may cause other errors after a template update/replace.


Windows Live Messenger Shows Contacts as Offline When They Are Really Online and You Cannot Send Offline Instant Messages to those Contacts

November 7, 2010

Recently I discovered a strange phenomenon under Windows Live Messenger 2011 (and it apparently also affects Windows Live Messenger 2010 as well). Some of your contacts will always be shown as being in “Offline” status when they are actually online (they show up as Online in other Messenger clients). You can receive instant messages from them, and messages sent to them from other clients also show up in the instant message windows of Windows Live Messenger 2011. When you attempt to send them an offline instant message, it reports: “The following message could not be delivered to all recipients”, and fails to send it it.

My wife is usually logged into a Windows Live Messenger instance through her cell phone carrier, and I often use Windows Live Messenger to send messages to her cell phone. For the past week or so my copy of Windows Live has shown her as Offline and failed to send her offline instant messages, which I initially thought to be a problem with her cell phone carrier’s system. When I started receiving messages from her which I could not reply to, I opened up Windows Live Web Messenger and verified that she was actually online the whole time. Web Messenger could also send her instant messages, which oddly enough would show up in the Windows Live Messenger 2011 instant message window.

I suspect that it is most likely a problem between the Windows Live servers and different versions of the Messenger protocol.

In the case of my wife’s account, I think her cell phone carrier’s software is using the old Messenger protocol, and it is somehow not being properly linked to the Windows Live servers (and ultimately clients) using the new protocol. Windows Live Web Messenger probably uses the old protocol.

The only solution seems to be to use a client which uses the older Messenger protocol.

You can use Windows Live Web Messenger which has no problems. The online version of Windows Live Messenger which is integrated into Windows Hotmail doesn’t work as it seems to (at least on my system). You can install Windows Messenger alongside MSN/Windows Live Messenger. It is lacking a lot of features and doesn’t always work well…but it is handy for situations where MSN/Windows Live Messenger is not working. You can download Windows Messenger 5.1.0701 here. To install it under Windows Vista or Windows 7 you will need to use a workaround or disable UAC to get the messenger.msi file to install correctly.