我的 Lotus 网络包含多个 Lotus Domino 服务器(每个组织单位都有自己的服务器)。我正在尝试连接到 Server_A,然后names.nsf
使用以下命令从 Server_B获取getDatabase()
:
Session session = NotesFactory.createSession("Server_A_IP:63148", superuser, pass);
Database names = session.getDatabase("CN=Server_B/O=Organization", "names.nsf");
我得到的错误:
Exception in thread "main" NotesException: Database CN=Server_B/O=Organization!!names.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)
at lotus.domino.corba._IDatabaseStub.searchU(Unknown Source)
at lotus.domino.cso.Database.search(Unknown Source)
at lotus.domino.cso.Database.search(Unknown Source)
打开names.nsf
使用session.getDatabase(null, "names.nsf");
工作正常。