使用 Java 的 Domino 数据库连接问题
Domino database connection issue using Java
我正在尝试使用以下 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: Could not get IOR from Domino Server: 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
[167FC:0002-16B70] Host Full Name: test.xxx.xxx.com
[167FC:0002-16B70] Host Short Name: xxx
[167FC:0002-16B70] Host Address: xxx.xxx.xx.1xx
[167FC:0002-16B70] Public Host Name/Address: test.xxx.xxx.com
[167FC:0002-16B70] TCP Port: 63148 Enabled
[167FC:0002-16B70] SSL Port: 0 Disabled
[167FC:0002-16B70] Initial Net Timeout: 120 seconds
[167FC:0002-16B70] Session Timeout: 60 minutes
[167FC:0002-16B70] Client Session Timeout: 62 minutes
[167FC:0002-16B70] IOR File: J:\Lotus\Domino\data\domino\html\diiop_ior.txt
[167FC:0002-16B70] Allow Ambiguous Names: True
[167FC:0002-16B70] Web Name Authentic: False
[167FC:0002-16B70] User Lookup View: ($LDAPCN)
[167FC:0002-16B70] Allow Database Browsing: True
[167FC:0002-16B70] TCP Name/Password Allowed: True
[167FC:0002-16B70] TCP Anonymous Allowed: True
[167FC:0002-16B70] SSL Name/Password Allowed: False
[167FC:0002-16B70] SSL Anonymous Allowed: True
[167FC:0002-16B70] Multi-Server Session Authentication: Disabled
[167FC:0002-16B70] Internet Sites: Disabled
[167FC:0002-16B70] Single Server Cookies: Enabled
我正在为此使用 NCSO.jar connection.I 我正在按照下面 IBM 官方 url 中提到的步骤进行操作
https://www.ibm.com/developerworks/lotus/library/ls-Java_access_pt1/index.html
此问题已解决。 IBM Domino 服务器默认端口 - windows 代理中未启用 63148,因为连接到 Domino 服务器时会出现此问题。
按照以下步骤启用 windows 10 -
上的端口
[http://www.tomshardware.com/faq/id-3114787/open-firewall-ports-windows.html]
我正在尝试使用以下 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: Could not get IOR from Domino Server: 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
[167FC:0002-16B70] Host Full Name: test.xxx.xxx.com
[167FC:0002-16B70] Host Short Name: xxx
[167FC:0002-16B70] Host Address: xxx.xxx.xx.1xx
[167FC:0002-16B70] Public Host Name/Address: test.xxx.xxx.com
[167FC:0002-16B70] TCP Port: 63148 Enabled
[167FC:0002-16B70] SSL Port: 0 Disabled
[167FC:0002-16B70] Initial Net Timeout: 120 seconds
[167FC:0002-16B70] Session Timeout: 60 minutes
[167FC:0002-16B70] Client Session Timeout: 62 minutes
[167FC:0002-16B70] IOR File: J:\Lotus\Domino\data\domino\html\diiop_ior.txt
[167FC:0002-16B70] Allow Ambiguous Names: True
[167FC:0002-16B70] Web Name Authentic: False
[167FC:0002-16B70] User Lookup View: ($LDAPCN)
[167FC:0002-16B70] Allow Database Browsing: True
[167FC:0002-16B70] TCP Name/Password Allowed: True
[167FC:0002-16B70] TCP Anonymous Allowed: True
[167FC:0002-16B70] SSL Name/Password Allowed: False
[167FC:0002-16B70] SSL Anonymous Allowed: True
[167FC:0002-16B70] Multi-Server Session Authentication: Disabled
[167FC:0002-16B70] Internet Sites: Disabled
[167FC:0002-16B70] Single Server Cookies: Enabled
我正在为此使用 NCSO.jar connection.I 我正在按照下面 IBM 官方 url 中提到的步骤进行操作 https://www.ibm.com/developerworks/lotus/library/ls-Java_access_pt1/index.html
此问题已解决。 IBM Domino 服务器默认端口 - windows 代理中未启用 63148,因为连接到 Domino 服务器时会出现此问题。
按照以下步骤启用 windows 10 -
上的端口[http://www.tomshardware.com/faq/id-3114787/open-firewall-ports-windows.html]