On 13/05/2010 21:29, Caldarale, Charles R wrote:
From: Maximilian Krickl [mailto:maxkri...@gmx.de]
Subject: Re: Configured JDBCRealm, but is not used

when I try to login via the login form of tomcat I get this:
13.05.2010 21:59:07 org.apache.catalina.realm.DataSourceRealm open
SCHWERWIEGEND: Exception performing authentication
javax.naming.NameNotFoundException: Name jdbc is not bound in this
Context

I'm not positive about this, but I think your<Resource>  declaration will need to be 
in server.xml in order to be used for a<Realm>

No, you can have the resource at the context level.

> The authentication is done by Tomcat, not the webapp, so it's Tomcat that has to have the database declaration available, not the webapp.

You need to use localDataSource="true" so the Realm looks locally for the DataSource.

 Likewise, the driver jar for the database needs to be in Tomcat's lib 
directory, not the webapp's.

I believe this part is correct.

 And, the<resource-ref>  isn't needed, since the<Resource>  is not being used 
by the webapp itself.

Correct.

It is a while since I tested this but I am sure it has at least worked in the past. I don't recall any changes that might have broken it.

Mark


  - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to