tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Ling" <>
Subject Re: Configuring DataSourceRealm using Oracle
Date Mon, 03 Mar 2008 20:03:48 GMT
Thank you, David.

Sorry, I sent this message two times, each time only the quoted message was
sent, but not my reply.  This is another try.

Actually I did read the document you provided the link to.  In that document
(The Realm Component) the following attributes are listed for the


and I actually used all of them in my first attempted configuration as shown
in my original email:

   First attempt:
   I replaced the above-mentioned <Realm> element with the following one,
mimicking the example for mySQL in the documentation:

      <Realm  className="org.apache.catalina.realm.DataSourceRealm"
              userTable="users" userNameCol="user_name"
          userRoleTable="user_roles" roleNameCol="role_name" />

And that did not work out, you know, as I mentioned.  I still do not know
what was wrong with my configuration for DataSourceRealm.  I still wonder
how Tomcat would know where to go to look for the users table and the
user_roles table, which are on the Oracle server which is,
and is not in any of the attributes listed above.  Did I miss any components
in the configuration that I tried?


On Mon, Mar 3, 2008 at 1:11 PM, David Delbecq <> wrote:

> Jason Ling a écrit :
> >
> > I changed the <Realm> element in the server.xml file, and it became:
> >
> >       <Realm  className="org.apache.catalina.realm.DataSourceRealm"
> >          dataSourceName="jdbc/webappDB"
> >              driverName="oracle.jdbc.OracleDriver"
> >           connectionURL=""
> >          connectionName="webappdb" connectionPassword="GreenHorn"
> >               userTable="users" userNameCol="user_name"
> > userCredCol="user_pass"
> >           userRoleTable="user_roles" roleNameCol="role_name" />
> >
> >
> your are using the datasourcerealm with parameters from the jdbcrealm,
> those are two separate realms. For datasource realm, you need to define
> a datasource that matches the one specified in
> dataSourceName="jdbc/webappDB"
> To get more information on how to configure a datasource, please go
> there:
> ---------------------------------------------------------------------
> To start a new topic, e-mail:
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message