Check your "classpath". Make sure that the JDBC jar file specified in your "classpath" is one in the same as that used by the development tool you are using to develop your Java app.
 
Cheers,
George
----- Original Message -----
Sent: Monday, February 05, 2001 10:22 AM
Subject: JDBC connectivity - java.sql.SQLException: No suitable driver

I am trying to host some webpages using Tomcat and when my webpage is being accessed, I am getting an error message on the linux console as:
java.sql.SQLException: No suitable driver

I have setup Tomcat-3.2.1 and Apache_1.3.14 with MySQL-3.23.31 under RedHatLinux 6.2.
jdk1.3 is installed under /usr/java.
Tomcat, Apache and MySQL are basically working fine
I have to setup login authentication from the webpages accessing data from MySQL (name of database is test, no user, no password).
I am trying to use MM.MySQL for JDBC connectivity to MySQL
 
As indicated in Tomcat/MM.MySQL documentation, I have tried as follows:

1. Modified $TOMCAT_HOME/conf/server.xml to add following lines:
        <RequestInterceptor
            className="org.apache.tomcat.request.JDBCRealm"
            debug="99"
            driverName="org.gjt.mm.mysql.Driver"
            connectionURL="jdbc:mysql://localhost/test''"
            />
2. I tried dropping mm.mysql-2.0.4-bin without un jaring under $TOMCAT_HOME/lib
 
Tomcat starts without any error but does not confirm Database connection.

Further when I am trying to stop Tomcat, I am getting additional error message as:
java.lang.NullPointerException

In a separate environment, I have used NT4.0, JavaWebserver, MySQL and ODBC
driver. Every thing is working over there including database access from the same
WebPages etc.

Can somebody help?
Thanks a million in advance.

Dipankar




Reply via email to