DIIOP problem with session.getDatabase()

Hi guys,

I have a Java application that uses DIIOP to connect to a Domino server and reads mail files, etc. I’m not using each user’s credentials for making the session but an administrator’s credentials and then try to get each user’s mailbox from the server.

I have two Domino servers in my environment A (transducer) and B (Brutus). Server A is the one that is running DIIOP and I’m connecting to from my Java client. Server B is an additional server that is known to A (via the server document).

Now when I make a connection to A to read mail files that are located on A, I have no problems and the application accesses the mail files and reads the mails properly. The problem is when I try to read a mail file from server B through server A. Here’s my code:

	Database db = null;

	View view = null;	

	ViewEntryCollection vec = null;

	DbDirectory dbDir = null;

	

	try

	{

		logger.logit("DominoSessionBean.getMail[] mailFile is " + mailFile);

		db = session.getDatabase(mailHost, mailFile);

		

		if (!db.isOpen()){

			try {

				db.open();

			} catch (Exception e) {

				logger.logit("Could not open: db:"+db);

				logger.logit(e.getMessage());

				// TODO: handle exception

			}

		}



		view = db.getView("($Inbox)");			

mailFile and mailHost are two variables that are read from each user’s document. For those located on server A the value is:

CN=transducer/O=cablesedge

And for those located on B the value is:

CN=brutus/O=cablesedge

As transducer and brutus are the names of my servers. The exception that happens when I try to get the “$Inbox” view for users that are located on Brutus, I get the following exception.

NotesException: Database CN=brutus/O=cablesedge!!MAIL\RD.nsf 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)

Any help with this will be greatly appreciated.

Subject: DIIOP problem with session.getDatabase()

Does brutus trust transducer? It will be on the Server document for brutus.

Subject: RE: DIIOP problem with session.getDatabase()

Thanks for your reply Stan.Yes it does. I used Domino Administrator to include it in the list of trusted servers in the brutus server document. However, except for one server document that I created for brutus, I don’t have any other sort of connection between the two servers like a connection document or anything. Do I need something else?

Subject: RE: DIIOP problem with session.getDatabase()

After I created a connection document, things seem to be working fine. But why two domino servers both in the same domain need such a document to find one another?