How to edit database outline using eclipse

hiI want to insert a new outline in bookmarks database using java(eclipse)…I tried following command but its not working.

Same command is working if I try it from domino designer.


import lotus.domino.*;

public class platform3

{

public static void main(String argv[])

{

    try

    {

        NotesThread.sinitThread();

        Session s = NotesFactory.createSession();

                   

        Database db = s.getDatabase("","bookmark.nsf");

        if (db.isOpen()){    

              Outline outline = db.createOutline("some new outline");

              outline.setAlias("new outline");

              outline.setComment("initiates something");

              outline.save();

        }else{

        	System.out.println("DB not opened");

       }

    }

    catch(Exception e)

    {

        e.printStackTrace();

    }

    finally

    {

        NotesThread.stermThread();

    }

}

}


everytime it is giving “DB not opened” although DB is opened and i have given manager access to default.

Can you help?

Subject: RE: How to edit database outline using eclipse

Perhaps you could elaborate on “not working”?

Subject: RE: How to edit database outline using eclipse

Not working as its not inserting the outlineIts giving following error.


NotesException: Database D:\Program Files\lotus\notes\data\new12.nsf has not been opened yet

at lotus.domino.local.Database.NcreateOutline(Native Method)

at lotus.domino.local.Database.createOutline(Unknown Source)

at lotus.domino.local.Database.createOutline(Unknown Source)

at platform3.main(platform3.java:15)

Error writing to process file pid.nbf,


Subject: RE: How to edit database outline using eclipse

The message “has not been opened yet” generally means that the database does not exist. The error message shows the filepath the code is trying to open. Is there really a file there? What ID is the code running with? Is it possible the database is encrypted and that ID can’t open it? (I don’t know whether that would cause this error – I just want to encourage you to look for anything out of the ordinary). What happens if you use that same filepath to try to open that same database in the Notes client, using the same ID?