tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cam Smith <>
Subject ResourceLink and DefaultContext
Date Fri, 22 Aug 2003 01:04:48 GMT
Hi tomcat-dev,

I posted this to the user list, and discovered that a few people are having 
the same problem, but no resolution seems to be known, so I hope you don't 
mind me posting here.  I'd really like to be able to use DefaultContext 
elements, but this issue prevents it.

Original message follows:

Summary of my problem is that I'm unable to access a global JNDI data 
source via a ResourceLink when that link is declared inside a 
DefaultContext element.  When I attempt the lookup, I get 
"javax.naming.NameNotFoundException: Name jdbc is not bound in this Context"

However, If I place the ResourceLink inside explicity declared Context 
elements, all works fine and I can access the data source from multiple 

The non-working server.xml using a DefaultContext is here:

The working server.xml using explicit Contexts is here:

The diff of the two files, showing that the context declaration is the only 
difference, is here:

My system is Tomcat 4.1.27 running on Sun Linux j2sdk1.4.1.  The data 
source configuration is commons DBCP over Postgres 7.3.2.

Anyone have any experience with this issue, or can see something I've 
missed in the config?


Cam Smith
Solid State
p:  613 9525 5040
f:   613 9593 8594
m: 0416 150 422

View raw message