Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 313
Michael Schlömp Avatar asked Nov 23 '25 13:11

Michael Schlömp


2 Answers

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.

like image 131
Michael Schlömp Avatar answered Nov 26 '25 03:11

Michael Schlömp


OK based on the logs, can you check that you do not have the Notes.jar on the CLASSPATH, only NCSO.jar.

Also can you try other methods to open the same database, and post the logs if the issue reoccurs.

Example:

Dim db As New NotesDatabase( "", "" )
Call db.Open( "server", "names.nsf" )
like image 29
Simon O'Doherty Avatar answered Nov 26 '25 04:11

Simon O'Doherty



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!