Hello,
we are running domino 6.0.3 under Windows 2000. We noticed in our development environment a few http-crashes and “NotesException: Out of Memory” per diem.
I have analyzed the problem and found a issue in domino regarding java-agents. I think it is a domino bug, maybe one of the lotus guys can give an opinon about that ‘issue’.
Here ist the bug:
When you fill a field on a document using java with the method doc.replaceItemValue(String,String) and the size of the value-String is in the range 21801 between 21720 Bytes the domino server prints out NotesException: Out of memory
at lotus.domino.local.Document.NreplaceItemValue(Native Method)
at lotus.domino.local.Document.replaceItemValue(Unknown Source)
Frequently beside this exception the http-task crashes and the server must be restarted completly.
I have written a simple Web-Testagent. With this i could reproduce the behaviour on other domino 6.0.3 servers.
Here is the test-method (use in java-agent):
public static void test(Session session) throws Exception {
System.out.println("Test - start");
int len = 21720; // length of the string that will be written
byte[] array = new byte[len];
for(int i = 0; i < (len-1); i++)
array[i] = 0x41; // fill String with 'A'
String str = new String (array);
System.out.println("String length: "+str.length());
Database db = session.getDatabase("","test.nsf");
Document doc = db.createDocument();
doc.replaceItemValue("Form","Test");
doc.replaceItemValue("Value",str); // CRASH
doc.save();
}
sincerely yours
Timo