我正在尝试使用以下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 在Lotus.domino.NotesFactory.requestIORPlain(未知来源) 在Lotus.domino.NotesFactory.requestIORUsingArgs(未知来源) 在Lotus.domino.NotesFactory.getIOR(未知来源) 在Lotus.domino.NotesFactory.createSessionUP(未知来源) 在Lotus.domino.NotesFactory.createSession(未知来源) 在Lotus.domino.NotesFactory.createSession(未知来源)
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
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进行此连接。我正在执行下面IBM官方URL中提到的步骤。 https://www.ibm.com/developerworks/lotus/library/ls-Java_access_pt1/index.html
答案 0 :(得分:0)
此问题已解决。在Windows代理中未启用IBM Domino服务器默认端口-63148,因为在连接到Domino服务器时即将出现此问题。
按照以下步骤在Windows 10上启用端口-
[http://www.tomshardware.com/faq/id-3114787/open-firewall-ports-windows.html]