tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "joelsherriff" <>
Subject Help with JDBCRealm config on Tomcat 4.1
Date Fri, 22 Apr 2005 19:56:20 GMT
Hope someone can help me - I'm still a relative newbie to tomcat, am baffled
at this point and I can't even get it configured so that I
can get debug info to find out what's wrong.

I've added a context to my server.xml for the webapp I'm trying to set up
JDBCRealm authentication for:

      <Context path="/blojsom" docBase="blojsom" debug="99" >
            <Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_blojsom_log." suffix=".txt" timestamp="true" />
            <Realm  className="org.apache.catalina.realm.JDBCRealm"
debug="99" driverName=""

                connectionName="xxxxxx" connectionPassword="xxxxxx"
                userTable="users" userNameCol="userid"
                userRoleTable="user_roles" roleNameCol="role_name" />

And, of course, added the supporting tables and roles to my database.  When
I attempt to access a page from the webapp,
my login.jsp page is displayed, and when I attempt to login, my error.jsp
page is displayed.   I didn't expect this to work
correctly the first time I configured it,  and it's not, but my problem is
that I can't figure out how to debug it at all.  The
Logger I have configured in the webapp's Context does nothing - doesn't
create the log file and nothing is logged
anywhere else either.   How can I further debug it?

Now, if I take the Realm out of the Context (applying it to the entire
server), I get an exception in my catalina_log:

2005-04-22 15:26:10 JDBCRealm[Standalone]: Exception performing
 at org.apache.catalina.realm.JDBCRealm.authenticate(

Though it doesn't say it precisely, I think this implies that it's not
connecting to the DB, but the db, user and password values are all correct.

Basically, I have three problems:  why can't I get logging to work from
within a specific context,  am I doing something wrong in my attempt
to get JDBCRealm authentication to work, and what is the right way to debug
the problem further, if the solution isn't obvious?

Also, I've added to my webapp's web.xml file:

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


Some Stuff

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message