tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Layman <>
Subject RE: Problem with JDBC-Connection to DB2 from Tomcat4.0.1
Date Fri, 25 Jan 2002 19:27:25 GMT

> -----Original Message-----
> From: Anja Falkner []
> Sent: Friday, January 25, 2002 4:06 PM
> To:
> Subject: Problem with JDBC-Connection to DB2 from Tomcat4.0.1
> Hello list,
> is there anyone, who has an idea or can explain me the 
> following situation:
> My JSP-file imports a self-written class named 'Connect'. 
> This class should connect to DB2 with using IBM-app-driver. 
> If I start this application, I get a ClassNotFoundException 
> because of the driver.
> I have tried, to copy the driver to the local directory and 
> the WEB-INF\classes\-directory. Then Tomcat says: Can't find 
> bundle for base name...
> BUT:
> My pure java-program '' on the same computer can 
> connect to DB2 without problems. It uses the same driver as 
> the Tomcat-Application.
> Is it possible, that Tomcat doesn't use the same CLASSPATH as 
> the system? And if, how can I say Tomcat, where he can find 
> the driver? 

Its not only possible, its a blessing.  The number of problems from
CLASSPATH problems that were posted on this list has dropped to almost

You have three options:
	1.  Place the Driver's jar file (or on UNIX use a symbolic link) in
your webapp's WEB-INF/lib directory for JAR Files WEB-INF/classes for plain
class files.
	2.  Place the Driver's jar file in TOMCAT_HOME/lib/apps if the JAR
file needs to be shared by all web apps
	3.  Modify the file in the TOMCAT_HOME/bin directory.
NOTE:  This method is unsupported and if you do it, you will mess things up,
especially since you had to ask this question.


> Many greetings
> Anja Falkner

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message