tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Phillips <>
Subject JDBC authentication configuration
Date Mon, 14 Jan 2002 01:12:27 GMT

I am relatively new to servlet/jsp programming, and struggling with JDBC 
authentication.  I have a tiny test application that works fine using form 
authentication against passwords and names in the tomcat-users.xml file. 
However, when I reconfigure the server.xml file for JDBC authentication 
(following the instructions on the Apache/Tomcat site) the server hangs 
during startup.

My little app is in a folder called /rmta-test.

Specifically, in the log, the hang comes early on in the startup process, 
right after a line saying:

Standard Manager [:/rmta-test]: Seeding of random number generator has 

Below I have quoted the relavant lines from the server.xml file, and the 
web.xml file for this application.  I don't think this has anything to do 
with the database, as Tomcat seems to hang on startup well before any 
interaction with the database.  However, the database tables are setup 
correctly per the docs, and I can query it manually.  I have also used a 
small stand-alone java program to create a table using the JDBC driver, so 
I know that the driver is installed correctly (in the tomcat library).

If I simply remove the Realm statement, then Tomcat starts up normally.

I'm pretty sure I've got something wrong in the configuration, of 
server.xml or web.xml, but i can't figure out what it is.  I would be 
grateful for anyone's help.

By the way, I'm using Tomcat 4.0.1 on unix.

Paul Phillips

Here are the lines that I inserted in my server.xml file to try and get 
JDBC authentication going:

<Context path="/rmta-test" docBase="rmta-test" debug="99" reloadable="true">
<Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
              userTable="tablename" userNameCol="login" 
          userRoleTable="rolestable" roleNameCol="role" />


Here is my web.xml file:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "">

      <web-resource-name>Entire Application</web-resource-name>



Paul Phillips
Director of Orchestral Activities, Meadows School of the Arts
Southern Methodist University

"You must sing every note you play, sing even through the rests!"
Arturo Toscanini

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message