Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JDBC Connection with Tomcat 1

Status
Not open for further replies.

Chikea

Programmer
Sep 9, 2004
3
DE
Hello,

how can I connect to a local db2 database (Personal Edition) out of a servlet in tomcat???
I copied the driver classes (db2java.zip)in common/lib directory. but when I call

Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");

Connection my_con = DriverManager.getConnection("jdbc:db2:my_project","my_login","my_password");

I became a ClassNotFound Exception...
In a simple Java Application the same code lines fit well...??? What is wrong with my tomcat configuration?

Greetings
 
If you are using tomcat 5, its ClassLoader does not read .zip files - they must be .jar files. Also, should "COM" be "com" ?

--------------------------------------------------
Free Database Connection Pooling Software
 
Wow great - that was the error!!!

THANX!!!
Chikea
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top