Search code examples
javalotus-domino

Domino database connection issue using Java


I am trying to connect IBM Domino DB using below java code but I am getting exception.

    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();
        }

    }
    }

## Exception : ##

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 Configuration as per below

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

I am using NCSO.jar for this connection.I am following the steps mentioned in below IBM official url https://www.ibm.com/developerworks/lotus/library/ls-Java_access_pt1/index.html


Solution

  • this issue is resolved. IBM Domino server default port - 63148 was not enabled in windows proxy due to that this issue was coming while connecting to the domino Server.

    followed below steps to enable the port on windows 10 -

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