使用Java的Domino数据库连接问题

问题描述 投票:2回答:1

我正在尝试使用下面的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:来自lotus.domino.NotesFactory.requestIORPlain(未知来源)的lotus.domino.NotesFactory.requestIORUsingArgs(未知来源)的莲花上的lotus.domino.NotesFactory.getIOR(未知来源)的http://test.xxx.xxx.com:63148/diiop_ior.txt。 lotus.domino.NotesFactory.createSession(未知来源)的lotus.domino.NotesFactory.createSession(未知来源)的domino.NotesFactory.createSessionUP(未知来源)

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进行此连接。我遵循以下IBM官方网址https://www.ibm.com/developerworks/lotus/library/ls-Java_access_pt1/index.html中提到的步骤

java lotus-domino
1个回答
0
投票

这个问题已经解决了。 IBM Domino服务器默认端口 - 63148未在Windows代理中启用,因为此问题在连接到多米诺骨牌服务器时出现。

按照以下步骤启用Windows 10上的端口 -

[http://www.tomshardware.com/faq/id-3114787/open-firewall-ports-windows.html]

© www.soinside.com 2019 - 2024. All rights reserved.