Cannot get database from domino server (from java application)

Discussion in 'Lotus Notes Programming' started by gekkothelizard, Aug 4, 2006.

  1. We have been trying to connect to a domino server from a java
    application, and succeded in getting a valid Session object, but cannot
    access any databases. Also the getting of the Session object is taking
    unusually long (1-2 min). We have tried every server setting we knew
    has something to do with connecting remote applications but nothing
    seems to solve the problem. The strangest thing is, we don't get any
    error messages, the connection just times out. We are quite clueless
    now, about this problem, so we would appreciate any help.

    Here is the java program we are testing the connection with, and it's
    (it's compiled with jdk 1.5)

    import java.text.DateFormat;
    import java.util.Date;
    import lotus.domino.*;

    public class Main extends NotesThread {
    public static void main(String[] args) {
    Main m = new Main();

    public void runNotes() throws NotesException {
    try {
    println("application started");

    //get the ior file
    String ior = NotesFactory.getIOR("");
    println("got ior data");

    //create the session
    Session s =

    //verify that session object contains real info
    println("Platform = " + s.getPlatform());

    //get database (it fails here)
    Database db = s.getDatabase(null, "namesX.nsf");

    //!App never gets here
    System.out.println("got db " + db.getFileName());
    } catch (Exception e) {

    private void println(String str) {
    System.out.println("["+getTime()+"]:" + str);

    private String getTime() {
    return DateFormat.getTimeInstance().format(new


    [1:50:42 PM]:application started
    [1:50:45 PM]:got ior data
    [1:52:30 PM]:platform = Windows/32
    org.omg.CORBA.COMM_FAILURE: Connection reset
    by peer: connect Host: 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.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._ISessionStub.getDatabase(Unknown Source)
    at lotus.domino.cso.Session.getDatabase(Unknown Source)
    at lotus.domino.cso.Session.getDatabase(Unknown Source)
    at connectiontest.Main.runNotes(
    at Source)
    gekkothelizard, Aug 4, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.