You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by eric chacon <ch...@hotmail.com> on 2001/04/17 14:07:01 UTC

JDBC Realm Question

I am trying to set up a JDBC Realm on tomcat 3.2.1
(Also, Linux, Postgres 7.0 something, Apache using mod_jk...)

Here is my entry in the server.xml file

     <RequestInterceptor
            className="org.apache.tomcat.request.JDBCRealm"
            debug="99"
            driverName="org.postgresql.Driver"

connectionURL="jdbc:postgresql://localhost:5432/mysite_userdb"
            userTable="users"
            userNameCol="user_name"
            userCredCol="user_pass"
            userRoleTable="user_roles"
            roleNameCol="role_name" />

Here is the error I get

FATAL:java.lang.RuntimeException: JDBCRealm.start.readXml: The user property
is
missing. It is mandatory.
java.lang.RuntimeException: JDBCRealm.start.readXml: The user property is
missing. It is mandatory.
        at org.apache.tomcat.request.JDBCRealm.contextInit(JDBCRealm.java,
Compiled Code)
        at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.ContextManager.init(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java, Compiled
Code)
        at org.apache.tomcat.startup.Tomcat.main(Tomcat.java, Compiled Code)

I have all the necessary databases set up, I can connect to postgres from 
stand-alone programs. I have the JDBC drivers in the classpath and in the 
tomcat/lib directory.

If I remove the connectionURL line or the driverName line, I get appropriate 
error messages telling me that these attributes are required.

I'm not sure what a user property is...

Cheers, and thanks,

Eric


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


Re: JDBC Realm Question

Posted by Stefan Meisner Larsen <sl...@nordija.com>.
Hi Eric

You seems to be missing:
	    connectionName="some_name"
	    connectionPassword="some_password"

in your RequestInterceptor setup

Under normal conditions it is the unix user/password you used when the db was 
created

Stefan


On Tuesday 17 April 2001 14:07, you wrote:
> I am trying to set up a JDBC Realm on tomcat 3.2.1
> (Also, Linux, Postgres 7.0 something, Apache using mod_jk...)
>
> Here is my entry in the server.xml file
>
>      <RequestInterceptor
>             className="org.apache.tomcat.request.JDBCRealm"
>             debug="99"
>             driverName="org.postgresql.Driver"
>
> connectionURL="jdbc:postgresql://localhost:5432/mysite_userdb"
>             userTable="users"
>             userNameCol="user_name"
>             userCredCol="user_pass"
>             userRoleTable="user_roles"
>             roleNameCol="role_name" />
>
> Here is the error I get
>
> FATAL:java.lang.RuntimeException: JDBCRealm.start.readXml: The user
> property is
> missing. It is mandatory.
> java.lang.RuntimeException: JDBCRealm.start.readXml: The user property is
> missing. It is mandatory.
>         at org.apache.tomcat.request.JDBCRealm.contextInit(JDBCRealm.java,
> Compiled Code)
>         at
> org.apache.tomcat.core.ContextManager.initContext(ContextManager.java,
> Compiled Code)
>         at org.apache.tomcat.core.ContextManager.init(ContextManager.java,
> Compiled Code)
>         at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java, Compiled
> Code)
>         at org.apache.tomcat.startup.Tomcat.main(Tomcat.java, Compiled
> Code)
>
> I have all the necessary databases set up, I can connect to postgres from
> stand-alone programs. I have the JDBC drivers in the classpath and in the
> tomcat/lib directory.
>
> If I remove the connectionURL line or the driverName line, I get
> appropriate error messages telling me that these attributes are required.
>
> I'm not sure what a user property is...
>
> Cheers, and thanks,
>
> Eric
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com