我正在尝试使用以下 java 代码连接 IBM Domino DB,但出现异常。
import lotus.domino.Database;
import lotus.domino.NotesFactory;
import lotus.domino.Session;
public class JavaAgent {
public static void main(String[] args) {
try {
String host = "test.xxx.xxx.com:63148";
Session s = NotesFactory.createSession(host);
String p = s.getCommonUserName();
System.out.println(p);
Database db = s.getDatabase("test.xxx.xxx.com", "s.nsf");
System.out.println(db.getFilePath());
} catch (Exception e) {
e.printStackTrace();
}
}
}
## 例外 : ##
NotesException:无法从 Domino 服务器获取 IOR:http ://test.xxx.xxx.com : 63148/diiop_ior.txt at lotus.domino.NotesFactory.requestIORPlain(Unknown Source) at lotus.domino.NotesFactory.requestIORUsingArgs(Unknown Source) ) at lotus.domino.NotesFactory.getIOR(Unknown Source) at lotus.domino.NotesFactory.createSessionUP(Unknown Source) at lotus.domino.NotesFactory.createSession(Unknown Source) at lotus.domino.NotesFactory.createSession(Unknown Source)
I tried to open the URL from browser using port 80 then it loading the file mentioned in error http://test.xxx.xxx.com:80/diiop_ior.txt
DIIOP 配置如下
tell diiop show config
[167FC:0002-16B70] Dump of Domino IIOP (DIIOP) Configuration Settings
[167FC:0002-16B70] Full Server Name: CN=xxx/O=xxxDEV
[167FC:0002-16B70] Common Server Name: xxx/xxxDEV
[167FC:0002-16B70] Refresh Interval: 3 minutes
我正在使用 NCSO.jar 进行此连接。我正在按照以下 IBM 官方网址https://www.ibm.com/developerworks/lotus/library/ls-Java_access_pt1/index.html 中提到的步骤操作
相关分类