You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Dipankar Sinha <di...@stssoftware.com> on 2001/01/23 03:03:34 UTC
JDBCRealm - can't make it work
Hello Sir,
I am trying to use Tomcat-3.2.1 and Apache_1.3.14 with MySQL-3.23.31 under RedHatLinux 6.2
Tomcat, Apache and MySQL are basically working fine and jdk1.3 is installed under /usr/java. I have to make Tomcat accessing data from MySQL (name of database is test) and I am having lack of understanding how to properly setup MM.MySQL. Please help.
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?user='';password=''"
/>
2. Unpacked mm.mysql.jdbc-1.2c.tar.gz under /opt
3. Have set up CLASSPATH as /opt/mm.mysql.jdbc-1.2c
4. Copied both mysql_comp.jar or mysql_uncomp.jar (one at a time) to $TOMCAT_HOME/lib
Now my questions are:
a) Do I need a separate software as DriverManager? if yes which is suitable one in my case?
b) Do I need to set up any connection separately to the MySQL database? How?
c) Do I need JDBCrealm.class in a specific path? How can I get the file?
When I am trying to access my webpages under Tomcat, I am getting an error message on the console as: java.sql.SQLException: No suitable driver
When I am trying to access MySQL through my Tomcat webpages or trying to stop Tomcat, I am also getting java.lang.NullPointerException
Can I get some help?
Thanks a million in advance.
Dipankar