Search code examples
javaeclipselotus-domino

Database does not open (Java program via DIIOP)


I try to open a database on a Domino server via a java program. Got a session to the Domino server. I use the following code to get/open the database.

session = NotesFactory.createSession(DOMINO_SERVER, DOMINO_USER, DOMINO_PW);
if ( session == null ) {
//do something
}
db = session.getDatabase(DOMINO_SERVER, DOMINO_DATABASE);
view = db.getView("someView");

The following error message occurs:

NotesException: Database xyz has not been opened yet

If I use the "open" - method

db.open();

the error

NotesException: Database open() failed

occurs. User has access to database. Maximum Internet name and password: READER.

Are there any configurations on the domino server I can check? Seems to be an security problem, but I don't see the cause. Any suggestions/hints?

[Update] Complete stack trace ...

NotesException: Database XYZ has not been opened yet
at lotus.domino.NotesExceptionHelper.read(Unknown Source)
at lotus.domino.NotesExceptionHolder._read(Unknown Source)
at lotus.priv.CORBA.iiop.RepImpl.invoke(Unknown Source)
at lotus.priv.CORBA.portable.ObjectImpl._invoke(Unknown Source)
at lotus.domino.corba._IDatabaseStub.getSize(Unknown Source)
at lotus.domino.cso.Database.getSize(Unknown Source)

For testing I try to get the size of the database with the "getSize()" method.

Complete stack trace from other error message:

NotesException: Database open failed ()
at lotus.domino.NotesExceptionHelper.read(Unknown Source)
at lotus.domino.NotesExceptionHolder._read(Unknown Source)
at lotus.priv.CORBA.iiop.RepImpl.invoke(Unknown Source)
at lotus.priv.CORBA.portable.ObjectImpl._invoke(Unknown Source)
at lotus.domino.corba._IDatabaseStub.open(Unknown Source)
at lotus.domino.cso.Database.open(Unknown Source)

[Update 2]: Screenshot from server console:

Screenshot from server console


Solution

  • Solved the problem with idea above from Simon.

    I tried an other method to open the database. Here the way I tried to open the database.

    session = NotesFactory.createSession(DOMINO_SERVER, DOMINO_USER, DOMINO_PW);
    if ( session == null ) {
    //do something
    }
    DbDirectory dir = session.getDbDirectory(null);
    db = dir.openDatabase(DOMINO_DATABASE);
    

    Nothing changed on the access rights for the user to server and database. Not sure why it works this way? Is there a bug or is there something with the server configuration?

    But most important ... it works now ... thanks Simon and Richard.