tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Chandler <a...@chandlerfamily.org.uk>
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 
java:/comp/env/jdbc/family_tree.

I then created a Realm which refers to it.


<Realm className="org.apache.catalina.realm.DataSourceRealm" debug="99"
   dataSourceName="java:/comp/env/jdbc/family_tree"
   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 
authentication
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
http://www.chandlerfamily.org.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message