Topic
1 reply Latest Post - ‏2013-01-03T13:49:27Z by SystemAdmin
SystemAdmin
SystemAdmin
334 Posts
ACCEPTED ANSWER

Pinned topic Exception in connection to remote DOMINO server through JAVA application

‏2013-01-03T06:04:32Z |
Hi All,

When I try to connect to the domino server from my java application i get an exception as follows:

NotesException: Could not open Notes session
at lotus.domino.cso.Session.initSession(Unknown Source)
at lotus.domino.cso.Session.<init>(Unknown Source)
at lotus.domino.cso.Session.createSession(Unknown Source)
at lotus.domino.NotesFactory.createSessionUP(Unknown Source)
at lotus.domino.NotesFactory.createSession(Unknown Source)
at lotus.domino.NotesFactory.createSession(Unknown Source)
at com.nseit.email.ReadEmailRemotely.run(ReadEmailRemotely.java:23)
at java.lang.Thread.run(Unknown Source)
Caused by: org.omg.CORBA.COMM_FAILURE: java.net.ConnectException: Connection refused: connect Host: 127.0.0.1 Port: 63148 vmcid: 0x0 minor code: 1 completed: No
at lotus.priv.CORBA.iiop.ConnectionTable.get(Unknown Source)
at lotus.priv.CORBA.iiop.ConnectionTable.get(Unknown Source)
at lotus.priv.CORBA.iiop.Generic.getConnection(Unknown Source)
at lotus.priv.CORBA.iiop.Generic.locate(Unknown Source)
at lotus.priv.CORBA.iiop.RepImpl.invokePreamble(Unknown Source)
at lotus.priv.CORBA.iiop.RepImpl.invoke(Unknown Source)
at lotus.priv.CORBA.portable.ObjectImpl._invoke(Unknown Source)
at lotus.domino.corba._IObjectServerStub.createSession(Unknown Source)
... 8 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at lotus.priv.CORBA.iiop.Connection.newSocket(Unknown Source)
... 16 more
Here is my java code:

import lotus.domino.*;

public static void main(String argv[])
{
ReadEmailRemotely t = new ReadEmailRemotely();
Thread nt = new Thread((Runnable)t);
nt.start();
}

public void run()
{
try
{
String host = "xxx.xxx.xxx.xx:63148";
Session s = NotesFactory.createSession(host);

}
catch(Exception e)
{
e.printStackTrace();
}
}

I am using NCSO.jar

Any suggestion on this would be of great help.
Updated on 2013-01-03T13:49:27Z at 2013-01-03T13:49:27Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    334 Posts
    ACCEPTED ANSWER

    Re: Exception in connection to remote DOMINO server through JAVA application

    ‏2013-01-03T13:49:27Z  in response to SystemAdmin
    On executing the following command tell diiop show config on DOMINO server the console output shows several parameters out of which 2 parameters shows as

    Host Address: 127.0.0.1
    Public Host Name/Address: 127.0.0.1

    Is this the cause for the above exception?