Notes.jar/ncso.jar question

I’m trying to write a program to access some Lotus Notes databases using Java/notes.jar/ncso.jar.

I have a couple of sample programs that basically do the same thing (as shown below), but I’m seeing a weird effect when I run them. No matter whether I tell it to connect to a hostname or an IP address (both of which resolve to a known 10.66 IP address), both programs fail with

NotesException: Could not open Notes session: org.omg.CORBA.COMM_FAILURE: java.n

et.ConnectException: Connection timed out: connect Host: 134.200.162.60 Port: 63

148 vmcid: 0x0 minor code: 1 completed: No

The strange thing is, notice how the “connect Host” server lists 134.200.162.60 as the IP, even though I’m passing in (and even hard coding in one of the programs) a 10.66 IP address.

Where is the 134.200 IP coming from? Does it get resolved from the PC that the program is running on, or does it come from the server once it connects (from the IOR?)?

Here are my two programs:

import lotus.domino.*;

public class DominoExample {

public static void main(String args)

{

try

        {   

String host = “10.66.2.9:63148”; //domino IP and Port

String user = “asdf”; //internet user name

String password = “asdf”; //password

// Session session = NotesFactory.createSession(host);

String ior = NotesFactory.getIOR(“10.66.2.9”);

System.out.println(ior);

Session s = NotesFactory.createSessionWithIOR(ior,user,password);

        String   username   =   s.getCommonUserName();   

System.out.println("Domino, : " + username);

        }   

        catch(Exception   e)   

        {   

        System.out.println(e.toString());

        }   

}

}

import lotus.domino.*;

public class platform6 implements Runnable

{

String host=null, user=“”, pwd=“”;

public static void main(String argv)

{

 if(argv.length<1)

 {

   System.out.println(

      "Need to supply Domino server name");

   return;

 }

 platform6 t = new platform6(argv);

 Thread nt = new Thread((Runnable)t);

 nt.start();

}

public platform6(String argv)

{

host = argv[0];

if(argv.length >= 2) user = argv[1];

if(argv.length >= 3) pwd = argv[2];

}

public void run()

{

try

 {

   Session s = NotesFactory.createSession(

               host, user, pwd);

   String p = s.getPlatform();

   System.out.println("Platform = " + p);

 }

catch (Exception e)

 {

   e.printStackTrace();

 }

}

}

Subject: notes.jar/ncso.jar question

Disregard. The problem was with the diiop_ior.txt file on the server having the wrong IP address in it.