TechTip: Connecting WebSphere Applications to Lotus Domino

Development Tools
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

If you are experiencing problems connecting to a Lotus Domino server remotely from a WebSphere Java application, check the following to see if your application environment is set up properly:

  • Make sure Domino Internet Inter-ORB Protocol DIIOP is set up on the Lotus Domino server. If DIIOP is not set up, you will receive a message that the remote host refused the connection.
  • Make sure to specify the port number of the Lotus Domino HTTP server when trying to obtain a NotesFactory session. For example:
    Session session = NotesFactory.createSession("systemName.domainName:portNumber", "user ID", "password").
    This will allow the CORBA request to get to the correct server. If the port number is not specified, you will receive a NotesException.
  • You may receive a NotesException of 4377, which states the following: "Server must be on same host as session when performing the getDatabase statement from a Java application using the following lines of code:
    Session session = NotesFactory.createSession(notesServer, notesUser, password);
    ndbContent = session.getDatabase(notesServer, notesDatabase);"

    There are two solutions: 1) On the getDatabase, send only the server name, not the server name along with the port number. 2) Pass in a pair of quotation marks ("") as the notesServer on the getDatabase call, which will force the use of the session just created:

    ndbContent = session.getDatabase("", notesDatabase);

  • Make sure that the CLASSPATH contains the NCSOW.jar file obtained from the version of Lotus Domino that you are using. This is the WebSphere version of the NCSO.jar file. The NCSO.jar is unusable because the IIOP levels will clash and you will not be able to create a session.
  • To use the Domino Java APIs to connect from a WebSphere Java application to a Domino database via IIOP, the application must import the lotus.domino.* package.
  • To obtain additional information on NotesExceptions, add the System.out.println in the code below. This allows you to print out static variables that explain the error better.

    catch(lotus.domino.NotesException ne)
    {
    System.out.println(ne.text + " " + ne.id);
    ne.printStackTrace();
    }


Dan Boyum is a Software Engineer on the Business Solution Test team located at the Rochester, Minnesota, laboratory. He has 2.5 years of experience in the software testing field. His areas of expertise include Lotus Domino and Windows servers on iSeries. Dan can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it..

Marilyn Dukart is an Advisory Software Engineer on the Business Solution Test team located at the Rochester, Minnesota, laboratory. She has over 15 years of experience in the software testing field. Her areas of expertise include Lotus Domino and WebSphere. Marilyn can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it..

Dan Boyum is an Advisory Software Engineer on the IBM i System Test team located at the Rochester, Minnesota, laboratory. Dan is the Technical Leader of the IBM i Post-GA Test team.  He has been in the software testing field since 2000. Dan can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it..

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: