Last Thursday, I had an urgent mail from one of my colleagues who wanted to execute a Java Agent from Lotus Notes to connect to the Oracle 11g database. He said that the system had thrown up the following output error message when he tried to execute the code:

By analyzing the error message and the code, I realized that the driver jar file was not included in the classpath. The error : ClassNotFoundException came because the jar file was not included. The correct jar file for this JDBC connection to Oracle 11g is ojdbc5.jar

To help him to link from Notes to Oracle 11g, I gave him a step by step procedure to add this jar into nsf as well as java build path.

Step 1: Change the designer perspective to Java. You will be able to see the folder structure of the nsf file. Expand WebContent –> WEB_INF folder

Step 2: Now Right click on the WEB-INF –> Choose New –> Choose Folder and name it as “lib”

Step 3: Copy the oracle jar file odbc5.jar into the lib folder.

Step 4: Now Right click on jar file –> Choose Add to build path.

Now your jar file will get automatically included in your java build path. For verification you will be able to see your jar file under “Referenced Libraries”.

Step 5: Now you will be able to find the “oracle.jdbc.OracleDriver” class from ojdbc5.jar.

With this you will be able to connect from Lotus Notes to the Oracle11g database.