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:
<GlobalNamingResources>
<Resource name="global/jdbc/pharmgkb" type="javax.sql.DataSource" auth="Container" scope="Shareable" />
<ResourceParams name="global/jdbc/pharmgkb">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
...
</ResourceParams>
</GlobalNamingResources>
From |$CATALINA_HOME/conf/[enginename]/[hostname]|/context-cas.xml:
<Context path="/cas" docBase="${dir.runtime.tomcat}/webapps/cas"
override="true"
allowLinking="true" caseSensitive="true"
cachingAllowed="true" reloadable="${pharmgen.runtime.tomcat.reloadable}"
debug="${pharmgen.runtime.tomcat.loglevel}">
<ResourceLink global="global/jdbc/pharmgkb" name="jdbc/pharmgkb" type="javax.sql.DataSource"/>
</Context>
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.
Thanks, -Mark
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
