I am trying to test the use of JDBCRealm with Tomcat 3.3m2 and
Postgresql 7.0.2 on a Redhat 7.0 system.

In server.xml I have commented out
<!-- <SimpleRealm  filename="conf/users/global-users.xml" /> -->
and uncommented
        <JDBCRealm
            debug="99" 
            driverName="org.postgresql.Driver" 
            connectionURL="jdbc:postgresql:tomcatusers"
                   connectionName="myname"
                   connectionPassword=""
            userTable="users" 
            userNameCol="username" 
            userCredCol="password" 
            userRoleTable="user_roles" 
            roleNameCol="role" />

My database is tomcatusers.  It includes

tomcatusers=# select * from users;
 username | password 
----------+----------
 root     | rootpass
 admin    | mypass

tomcatusers=# select * from roles;
     role     
--------------
 tomcat
 role1
 tomcat_admin
 tomcat_root

tomcatusers=# select * from user_roles;
 username |     role     
----------+--------------
 admin    | tomcat
 admin    | role1
 admin    | tomcat_admin
 root     | tomcat
 root     | role1
 root     | tomcat_admin
 root     | tomcat_root

In /var/tomcat/lib/common I have this link:
lrwxrwxrwx    1 root     root           30 Mar 20 00:06 jdbc7.0-1.2.jar
-> /usr/lib/pgsql/jdbc7.0-1.2.jar*

When I try to access the admin webapp, I get the frontend page; when I
try to access the Context list, I get the following in the tc log.

2001-03-22 02:32:17 - JDBCRealm: There was an SQLException while in
checkConnection: {0} - The user property is missing. It is mandatory.
        at java.lang.Throwable.<init>(Throwable.java:84)
        at java.lang.Exception.<init>(Exception.java:35)
        at java.sql.SQLException.<init>(SQLException.java:100)
        at
org.postgresql.util.PSQLException.<init>(PSQLException.java:22)
        at org.postgresql.Connection.openConnection(Connection.java:102)
        at org.postgresql.Driver.connect(Driver.java:116)
        at java.sql.DriverManager.getConnection(DriverManager.java:523)
        at java.sql.DriverManager.getConnection(DriverManager.java:205)
        at
org.apache.tomcat.modules.aaa.JDBCRealm.checkConnection(JDBCRealm.java:331)
        at
org.apache.tomcat.modules.aaa.JDBCRealm.checkPassword(JDBCRealm.java:265)
        at
org.apache.tomcat.modules.aaa.JDBCRealm.authenticate(JDBCRealm.java:441)
        at
org.apache.tomcat.core.Request.getRemoteUser(Request.java:476)
        at
org.apache.tomcat.modules.aaa.AccessInterceptor.authorize(AccessInterceptor.java:313)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:773)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:701)
        at
org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Ajp13Interceptor.java:162)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:424)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:497)
        at java.lang.Thread.run(Thread.java:498)

What is the problem with the user property?

Peter
-- 
Peter B. West  [EMAIL PROTECTED]  http://powerup.com.au/~pbwest
"Lord, to whom shall we go?"

Reply via email to