I am trying to export DXL of a NSF which is about 4.5GB in size. I am using the Java APIs with local lotus notes context and the following is the code snippet of the export functionality -
Stream stream = s.createStream();
if( stream == null ) {
System.out.println("Error creating stream");
}
String dxlName = “sample.dxl”;
if (stream.open(dxlName))
{
stream.truncate();
exporter = s.createDxlExporter();
stream.writeText(exporter.exportDxl(db));
exporter.recycle();
}
stream.close();
stream.recycle();
This code works fine for smaller NSFs and generates the DXL correctly.
However for a large NSF ~ 4GB or so it fails with the following error →
terminate called after throwing an instance of ‘unsigned short’
Stack base = 0xb7d7ac9c, Stack size = 1996 bytes
Fatal Error signal = 0x00000006 PID/TID = 6225/-1210594416
3/23/2010 11:36:40 Running NSD
You must be in the Notes/Domino data directory when you run this script
and you must have run Domino at least once
3/23/2010 11:36:41 Termination is in progress
3/23/2010 11:36:41 Terminating tasks
3/23/2010 11:36:46 Freeing resources
3/23/2010 11:36:46 Termination completed