You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Cam Smith <ca...@solidstate.com.au> on 2003/08/20 06:59:19 UTC

ResourceLink and DefaultContext

Hi all,

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 
webapps.

The non-working server.xml using a DefaultContext is here:
http://www.solidstate.com.au/temp/server-default.xml

The working server.xml using explicit Contexts is here:
http://www.solidstate.com.au/temp/server-explicit.xml

The diff of the two files, showing that the context declaration is the only 
difference, is here:
http://www.solidstate.com.au/temp/server-diff.txt

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?

thanks,


Cam Smith
Solid State
----------------
p:  613 9525 5040
f:   613 9593 8594
m: 0416 150 422
e: cam@solidstate.com.au