Reputation: 23
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(ReadEmailRem otely.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(Unknow n Source)
at lotus.priv.CORBA.iiop.Generic.locate(Unknown Source)
at lotus.priv.CORBA.iiop.RepImpl.invokePreamble(Unkno wn Source)
at lotus.priv.CORBA.iiop.RepImpl.invoke(Unknown Source)
at lotus.priv.CORBA.portable.ObjectImpl._invoke(Unkno wn Source)
at lotus.domino.corba._IObjectServerStub.createSessio n(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 and I have verified all the setting of DIIOP connection is correct.
Since I am providing the HARDCODE IP Address why do my JAVA Application trying to connect localhost IP (127.0.0.1)
Any suggestion on this would be of great help.
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?
Upvotes: 2
Views: 3423
Reputation: 9359
I am not sure why you are getting 127.0.0.1, but the error "Connection Refused" normally means DIIOP is not running on that port.
From the Domino server type
load diiop
After that try connecting directly to the IOR_TEXT to make sure it is running (using a web browser).
example:
http://xxx.xxx.xxx.xxx:63148/diiop_ior.txt
You should get a string of numbers if the server is working correctly.
Upvotes: 4