简体   繁体   中英

Lotus Domino Server does not return any views in Java (getViews is empty)

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".

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM