The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by mfromin]

Tony,

{Domino 5.02C server on NT4}

I was reviewing a combination of your book and an article you did on Notes.net
regarding servlets. I have a servlet setup so that it can access various
information on our Domino server. This all works fine.

Next, I wanted to connect to our DB2 server and get other info. The DB2
server is on an AIX box on the same IP segment as the domino server.

I am using JDK 1.3 to compile the code, and the compiler does not have any
issues with my code. Unfortunately when I try to run the servlet with calls
to the DB2 server I get a "ClassNotFoundException" error looking for the DB2
driver. So far I have:

1) Added the JavaUserClasses line to the Notes.ini and referenced the db2
driver zip file.

2) Added a reference to the same Zip file in the server document under the
class path area.

3) set the CLASSPATH variable to point to the directory where the driver (Zip
file) is located.

4) Tried (1) and (2) when referencing the .app. and .net. versions of the
driver. Since the DB is on another machine I am pretty sure I need the .net.
version of the DB2 driver.

I am quite puzzled regarding what I must do to make the Domino server find the
driver. On page 354-355 of the book you appear to do exactly what I need to
do. You even reference that the driver should be "properly" installed.

Any ideas?
import-bot (20211) [Avatar] Offline
#2
Re: Servlets and DB2 Database access
[Originally posted by mfromin]

Solved my own problem this morning!

First - I ended up using the Class Path section of the Java Servlets page of
the server document. I modified the Class Path to be:

"dominoservlet; e:jdbcdb2java.zip"

The proper setup for this line is not clear in any of the Domino docs I saw.
Got there thru trial and error...

Once I did this and restarted the server this made the servlet manager aware
of the necessary DB2 drivers.

Once I had the driver loaded I was able to connect to the DB2 database without
a problem. Apparently a good nights sleep and starting over from scratch with
the server configuration was the solution.