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:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how
to.html
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:

GRANT ALL PRIVILEGES ON DBPrueba.* TO
'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:

<parameter>
        <name>driverClassName</name>
        <value>org.gjt.mm.mysql.Driver</value>
     </parameter>

for these ones:

     <parameter>
        <name>driverName</name>
        <value>org.gjt.mm.mysql.Driver</value>
     </parameter>

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.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to