2
votes

I need to send/extract emails from Lotus notes using JAVA API. I am using JDK 11 (no other choice is possible)

But there is a problem when I try to create the session:

import lotus.domino.*;

public class TestDomino  {
 
    public static void main(String[] args) {
        try {
            Session s = NotesFactory.createSession();
        } catch (NotesException e) {
            e.printStackTrace();
        }

    }
}

I have the following error:

Required type:
    Throwable
Provided:
    NotesException 

Error:(9, 9) java: cannot access org.omg.CORBA.UserException
  class file for org.omg.CORBA.UserException not found

Is Lotus notes incompatible with JDK 11?

What is the fast way to make it work properly?

1

1 Answers

1
votes

The same issue hit me in the morning.

First of all you have to be sure that you are using an 32-Bit JDK. The guys at AdoptOpenJDK provide some over here: https://adoptopenjdk.net/releases.html

To fix the issue with the missing COBRA classes just add this dependency to your pom.xml:

 <dependency>
   <groupId>org.glassfish.corba</groupId>
   <artifactId>glassfish-corba-omgapi</artifactId>
   <version>4.2.1</version>
 </dependency>