tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Chandler <>
Subject Really struggling with DataSource'd Realm
Date Mon, 29 Aug 2005 14:56:51 GMT
I am try to to use FORM based authorisation to control access to part of my 
database application.  Consequently I have added the users and user_role 
tables to my database which is already been set up as 

I then created a Realm which refers to it.

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

As per the docs

When I try and login I get a naming exception

2005-08-29 15:51:54 DataSourceRealm[/famtree]: Exception performing 
javax.naming.NameNotFoundException: Name java: is not bound in this Context

I have experimented with several strings for dataSourceName in the Realm tag 
above such as dropping the java: at the front, or removing the leading slash, 
or leaving out the frontf the string and just adding jdbc/family_tree, and 
even renaming the resource to just family_tree.

In every case it seems to stop passing the name at the first delimeter (':' or 
'/') and failing.

Is there something wrong with the DataSourceRealm in this version of tomcat 
(4.1.3) or am I doing something else wrong?

Can somebody guide me through this please.

Alan Chandler

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

View raw message