Hello Alan,
try removing the / in your jndi name
java:comp/env/jdbc/family_tree.
Thanks !
-----Original Message-----
From: Alan Chandler [mailto:[EMAIL PROTECTED]
Sent: Monday, August 29, 2005 10:57 AM
To: [email protected]
Subject: Really struggling with DataSource'd Realm
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]