Java agents with imported .jar files

Many of us Notes developers know the problem. You have developed a Java agent that contains methods from imported .jar files in addition to the actual code.
When the agent is executed on a HCL Domino server, it works for a while ( sometimes longer, sometimes shorter ), but then causes problems due to memory leaks.
The problem lies in the architecture of Domino. The imported .jar files are reloaded every time the agent is started and over time they use more and more RAM.

The workaround was to dump the .jar files to the server’s file system. This works, but always causes problems where you as a developer do not always have access to the server.
Or there is already a .jar in the file directory; but not in the required version. Copying your own .jar into the file system can then lead to undesirable side effects.

I had therefore created a case at HCL to get a fix for the problem. The problem was tracked under SPR # BHUY8PRMKK. Yesterday I received an update from support:

The Product Development Team had developed a possible fix that mitigates the issue but the fix was of medium risk and it was decided not to submit the fix. As an alternative they have come up with a workaround. Set the following notes.ini, this will cache the agentloader objects and reuse them.

EnableJavaAgentCache=2

I have set the parameter on my test system. At the moment it looks like it solves the problem. I will continue testing.

Many thanks to HCL Development & HCL Support ( especially to Abhaysingh Shirke ).


No Information About Free Time

No Information About Free Time When planning a meeting, some users do not see any information about free time of some of the invited persons. When you right click on the planner, you can open the calender. When you click left, a “You are not authorized … ” error message occurs in the client’s statusbar.
Access to free time information is set company wide by policy to be visible to all people.

I found out that in all cases where this issue occurs, the “AllowList” field in the persons entry in clubusy.nsf was not empty, although it should be empty

Field Allow List

It seems that the field value is not properly deleted or updated when either the adminp tries to install the new mail policy or the user edited the calendar profile document.
When you delete the entries from the field, information about free time is provided.
So far, so good. After the server has updated the clubusy.nsf the error occurs again.
Then I looked closer at the calendar profile and found an entry in the “AllowBusyAccess” field.

AllowBusyAccess

Deleting the entry in this field and running a “tell sched validate username” after deleting the user document in the clubusy.nsf finally solved the problem.

Update: Now SPR “MFUN77EK4R”


RANT: How to solve an SPR – the IBM way

Have you ever tried to INSERT a RichTextItem into an existing RichTextItem instead of appending it ?
Let’s see how we could accomplish this. Actually there is no explicit method in the NotesRichText class to insert an item, but let’s see what the AppendRTItem method could do for us.

Oh, YES, here it is … right from the designer help ( version 6.5.1 ):

Usage
By default the insertion occurs at the end of the item. You can change the insertion point with BeginInsert and EndInsert.

This is easy, here is the code

Dim ses As New notessession
Dim db As NotesDatabase
Dim col As notesdocumentcollection
Dim doc As  NotesDocument
Dim rtitem2 As NotesRichTextItem
Dim rtitem1 As NotesRichTextItem
Dim rtnav As NotesRichTextNavigator

Set db=ses.CurrentDatabase
Set col=db.unprocesseddocuments
Set doc=col.GetFirstDocument

Set rtitem1 = doc.getfirstitem("Body")
Set rtitem2 = doc.getfirstitem("RTF")

Set rtnav = rtitem.CreateNavigator
Call rtnav.FindNthElement(RTELEM_TYPE_TEXTPARAGRAPH,1)

Call rtitem1.BeginInsert(rtnav)
Call rtitem1.addnewline(1)
Call rtitem1.AppendRTItem(rtitem2)
Call rtitem1.EndInsert
Call doc.save(True, True)

But what is this ? When you execute the code you’ll get an error message: “Method is not available.”

Hmm, do a search on the Lotus Notes KnowledgeBase and you’ll find this entry. And you can see in the document that there is an SPR# LGAA5N6FHT. But , huuuh, what is that ?

and was determined not to be a software problem. Notes and Domino are functioning as designed.

Does the documentation does not implies that it IS possible ? OK, it takes some time to code a new function and do all the quality stuff ( the KB document ist from the year 2004 as well as the mentioned SPR ) . Maybe they built it into the Notes 7 codestream.

But, NO WAY !!! Instead of having it got to work they just changed the designer help.

Usage
The insertion occurs at the end of the item. AppendRTItem cannot be called after BeginInsert.

IBM. please don’t tell me that ist is not possible to build this function !!! You’ve had 2 years. Instead of NEW classes and methods and stuff you should rather finish the coding of already intended methods in existing classes.

If you are not able to do the coding, please ask Ben Langhinrichs. He is able to solve the problem. And inserting RTItems the same way as inserting pure text after BeginInsert is a function that is needed, indeed.

I’ll hope tha some of the new guys at IBM will listen to the customers needs.