tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugo Martínez Prado <>
Subject Connecting to MySql. Cannot load JDBC driver class 'null'
Date Wed, 20 Aug 2003 15:20:03 GMT
Hi there, I hope this to be useful to somebody.

I installed Tomcat 4.1.24 y MySql 3.23 en Linux Red Hat 8.0
Followed the steps within jakarta page:
in order to get connected to my database.
However, I found the next error: "Cannot load JDBC driver class 'null'."
After some troubleshooting, I finnaly got with two problem causes:

 1. For some reason, Mysql's  JDBC Driver tries to connect to
"localhost.localdomain". Which means, that when you specify into the
connection string (in my case) "jdbc:mysql://localhost:3306/DBPrueba" java
tries always to connect to "localhost.localdomain".
I solved this problem assigning permission to the Database in Mysql for my
test user, only that this time for different domain:

'administrator'@'localhost.localdomain' IDENTIFIED BY 'passwd';

 2. Tha Database version I'm using doesn't recognize the default parameter
used by <Resource> within server.xml, to setup JDBC driver manager. Which
for I had to modifify the next lines:


for these ones:


The steps I made here are an adition over the manual found in  Tomcat web
page. For further reference, please follow th link shown in this mail.

View raw message