Problems using Java to connect to domino server using DIIOP

I am trying to use a standalone java application to connect to a domino server using DIIOP. I have set up the server as correctly as far as I can see, and have the DIIOP task running. I can telnet the server on port 63148, so there don’t appear to be any firewall issues. My simple code is like this:

System.out.printn(“About to connect”);

String ior = NotesFactory.getIOR(“:63148”);

System.out.println(“IOR Retreived”);

Session s = NotesFactory.createSessionWithIOR(ior,“”,“”);

System.out.println(“Session Created”);

My ouput is:

About to connect

IOR Retreived

Exception in thread “main” 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.createSessionWithIOR(Unknown Source)

at au.com.auscript.NotesAccess.TestNotesAccess.main(TestNotesAccess.java:13)

Caused by: org.omg.CORBA.COMM_FAILURE: java.net.ConnectException: Connection timed out: connect Host: 150.101.72.114 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)

... 6 more

Caused by: java.net.ConnectException: Connection timed out: 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)

... 14 more

Any ideas? If I can retrieve the ior text file ok, why can’t I connect?

Thanks.

Subject: Problems using Java to connect to domino server using DIIOP

I’m using DIIOP often but I never tried to use ‘createSessionWithIOR()’. Everytime I use the method createSession(String ip, String user, String pwd). If the String ‘ip’ not is null it will be automatically an DIIOP-Session.But the Error-Message looks a bit like a problem with retrieving the ior from server. Have you tested the content of the String ior? Must not be that the method getIOR() throws an exception if it is nothing or empty string.

You can also check the path of the domino: /data/domino/html. There must exist an file named ‘diiop_ior.txt’.

Subject: RE: Problems using Java to connect to domino server using DIIOP

Hi Thomas, thanks for the response. I seem to be able to retrieve and view the diiop.txt file ok from that location. I can actually view it in a browser. It seems to be a problem only when I try to get the session.

Thanks,

Rob C

Subject: RE: Problems using Java to connect to domino server using DIIOP

Have you tried with createSession(String server, String user, String pw) ?The relult should be the same. Whitch jar-file (notes.jar or ncso.jar) do you use in your applikation?

Subject: Solved!

Thanks Thomas for you suggestions. It ended up being a setting of the server document that was causing the grief. I put in the ip address of the server on the DIIOP tab, and changed access from anonymous to ‘User and Password’, and it started working.