Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
Information Mgmt
New to Lotus
How to buy
Live demos
Technical library
Forums & community
Java™ technology
Open source
SOA and Web services
Web development
My developerWorks
About dW
Submit content

developerWorks  >  Lotus  >  Forums & community  >  IBM Lotus Notes/Domino 8.5 Forum (includes Lotus Notes Traveler)

IBM Lotus Notes/Domino 8.5 Forum (includes Lotus Notes Traveler)

Previous Next
Subject: Java to Lotus Notes connection issue
Feedback Type: Problem
Product Area: Domino Server
Technical Area: Accessibility
Platform: ALL
Release: 8.5.3
Reproducible: Always

I am trying to access the data from Lotus Notes database into an external Java program, but no luck.

On my laptop, I have configured IBM Domino 9.0.1 server, where I have created a demo database. My target is, to access the data from this database through external Java code. I have also installed Netbeans and Eclipse on the same laptop where Domino server is configured. Now, I am trying to access the demo lotus notes database in my java program (netbeans/eclipse) using the classes provided in Notes.jar package, but unable to open database.

To accomplish the task, I have followed below steps:

Added the path 'C:\Program Files\IBM\Domino' to 'Path' system variable, and rebooted the laptop.
In Netbeans (also tried in Eclipse), created Java class (console application), added Notes.jar file (IBM/Domino/JVM/lib/ext/Notes.jar) in the classpath (in netbeans, added Notes.jar in Resources section. In Eclipse, copied Notes.jar in lib folder).
Added the following code in the class: (assume lotus.domino.* is already imported in the code)

public static void main(String [] args)
Session session = NotesFactory.createSession()//Connect the server with server ID. Throws error 'Database has not been opened yet';
//Also tried following options. Note that I have assigned full access/manager rights to anonymous user on the demo database
//Session session = NotesFactory.createSession((String)null);//Same result as first one [NotesFactory.createSession()]
//Session session = NotesFactory.createSession((String)null,"Romil Handoo/dev","My_Domino_Internet_Password");//Connect the server as Romil Handoo/dev login. Throws error- Invalid User Id/Password. I am giving correct ID/password
//Session session = NotesFactory.createSession((String)null,"","");//Access with anonymous user. Throws error 'Database has not been opened yet'**
Database dbDemo = session.getDatabase(session.getServer(), "demo/DemoDB.nsf");
//session.getServer() is returning my server name, which is Development/home.
//Also tried these, but same result each time:
//Following line throws exception 'Database has not been opened yet'
View vwDemo = dbDemo.getView("vwDemo");
catch(Exception ex)
//For case 1, case 2, and case 4, error message is 'Database has not been opened yet'
//For case 3, error message is 'Invalid login id/password'


Please someone guide me how I may connect to domino database through external java code? For all these steps, I have referred the page

Many thanks

Feedback number WEBBB64APZ created by Romil Handoo on 11/01/2018

Status: Open


Search this forum

Member Tools

RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds


Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds


IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite