0
votes

I have the following problem:

I'm currently writing a tool which can extract e-mails from multiple sources into a database for forensic analysis. Currently, I'm writing an extractor for Lotus NSF-Files. I'm using a locally installed Domino server and I connect to the NSF-file directly using "Notes.jar". The server itself is not running!

Now i'm facing the problem when opening some nsf-files "getViews()" does not return any views at all:

lotus.notes.NotesThread.sinitThread();
s = NotesFactory.createSession();
db = s.getDatabase(null, filename, false);
List<View> views = db.getViews(); // is empty!
for (View view : views) {
   String viewName = view.getName();
   if (view.isFolder() | allowedNonFolderViews.contains(viewName)) {
         ViewEntryCollection collection = view.getAllEntries();
         ....
   }
}

The strange thing is that it works for some files. When I open the files in the Notes Client all folders are shown.

Does anybody know how the get a list of all views. I think it has something to do with "private folders".

2
Try adding a db.open() before using db.getViews(). Also, does the user id running the code have access to the databases where it fails? - Per Henrik Lausten
The database is already opened. I can extract everything from the nsf, except the views a message is stored. - Stefan Glasenhardt

2 Answers

0
votes

If your local install is a 64-bit Domino server, I believe there's a long-running problem with getViews() and all the other getX methods that retrieve lists of design elements.

I've only seen this with the COM classes when the target is a local 64-bit install, but the code underneath the Java and COM classes is the same. It wouldn't be a big surprise if the same problem affects the Java classes, so that's my guess.

IBM's response to it was that the COM classes are not supported for 64 bits, but maybe they've got a solution for Java. This was at least six years ago, by the way.

0
votes

I've come around the problem in using another library:

"domino-jna" is a Java-Wrapper for the Notes C-API and works way better then the "native" JAVA-API.

The problem is now solved for me.