tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Walter, Oliver (BR/ICI3)" <>
Subject AW: datasource-realm troubles
Date Tue, 30 Jan 2007 13:04:38 GMT
Hash: SHA1

Hi Chris,

i followed your suggestion and removed the <resource-ref> from web.xml and the good
news is, that
hibernate using the datasource is still working, but ...

i still run into the same error

83743 [http-8080-Processor25] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/jmangos]
 - Exception performing authentication
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
	at org.apache.naming.NamingContext.lookup(
	at org.apache.naming.NamingContext.lookup(
	at org.apache.catalina.realm.DataSourceRealm.authenticate(

On the tomcat jndi-datasource-example-howto is written:

"In order to get Realms to work, the realm must refer to the datasource as defined in the
<GlobalNamingResources> or <Context> section, not a datasource as renamed using

That`s what i have, a Realm and a Datasource defined in the same <Context> section,
but it`s not working. If i define the datasource in <GlobalNamingResources> and <ResourceLink>
the datasource to my <Context>, then it is working, but that should not work, due to
the jndi-datasource-example-howto.

Could this be a bug in Tomcat 5.5.20? At Marc i found this error a couple of times, but not
a real solution.

Regards Oliver

> -----Urspr√ľngliche Nachricht-----
> Von: Christopher Schultz []
> Gesendet: Montag, 29. Januar 2007 18:44
> An: Tomcat Users List
> Betreff: Re: datasource-realm troubles
> Oliver,
> Walter, Oliver (BR/ICI3) wrote:
> > In META-INF/Context.xml i defined a datasource:
> >
> > <Resource name="jdbc/mangos"
> [snip]
> > and in web.xml a resource reference:
> >
> > <resource-ref>
> [snip]
> > With hibernate everything works fine, no problems, but if i define a
> > datasource realm in Context.xml
> >
> > <Realm dataSourceName="jdbc/mangos"
> The very bottom of this page says that with a <Realm> defined in
> context.xml, you must use a JNDI DataSource defined in
> <GlobalNamingResources>, not one that has been <resource-ref>'d into
> your webapp:
> es-howto.html
> Since you /are/ defining your <Resource> in your context.xml file, I
> don't think you need the <resource-ref>. It may be confusing
> things. (??)
> -chris
> ---------------------------------------------------------------------
> To start a new topic, e-mail:
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Version: SECUDE secure mail
Comment: SECUDE Office Security Suite -


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message