tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Woon <>
Subject [TC5] Problems with context.xml
Date Sun, 06 Jun 2004 02:22:30 GMT
Hi all.

According to the docs, it's possible to stick <Context> specific data 
into it's own config file in the 
|$CATALINA_HOME/conf/[enginename]/[hostname] |directory.  Unfortunately, 
I'm having problems when using it with JNDI resources.  When I take the 
<Context> element from my server.xml and put it in its own context.xml 
file it is suddenly unable to find the ResourceParams for the JNDI 
resource it needs.  Here are the relevant sections from my config files:

 From server.xml:
  <Resource name="global/jdbc/pharmgkb" type="javax.sql.DataSource" 
auth="Container" scope="Shareable" />
  <ResourceParams name="global/jdbc/pharmgkb">

 From |$CATALINA_HOME/conf/[enginename]/[hostname]|/context-cas.xml:
<Context path="/cas" docBase="${dir.runtime.tomcat}/webapps/cas"
  allowLinking="true" caseSensitive="true"
  cachingAllowed="true" reloadable="${pharmgen.runtime.tomcat.reloadable}"
  <ResourceLink global="global/jdbc/pharmgkb" name="jdbc/pharmgkb" 

When this <Context> element is under the <Host> element in server.xml, 
it works fine.  When it is in its own file, I'm getting:

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of 
class '' for connect URL 'null', cause:
java.sql.SQLException: No suitable driver

Any pointers would be greatly appreciated.  Tomcat 5 supports this usage 
scenario, right?  I've tested this with Tomcat 5.0.19, 5.0.25 and 
5.0.26-beta with no success.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message