Here's an example that's working for me. <Context path="/dars" docBase="dars" debug="1" reloadable="true" crossContext="true">
<Resource name="jdbc/THEDB" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@AAA.BBB.CCC.DDD:EEEE:FFFF" username="XXXX" password="YYYY" maxActive="20" maxIdle="1" maxWait="15000" removeAbandoned="true" logAbandoned="true" removeAbandonedTimeout="300" testOnBorrow="true" testOnReturn="true" validationQuery="select 1 from dual" /> </Context> On 12/19/05, Diego Ballve <[EMAIL PROTECTED]> wrote: > > Hello, > > I'm trying to migrate a context descriptor for a webapp named omar, from > Tomcat 5.0.x to 5.5.x but I had no luck. This is my new > <tomcat>/conf/Catalina/localhost/omar.xml: > > <Context path="/omar" debug="5"> > <Resource name="omar-registry" auth="Container" scope="Shareable" > type="javax.sql.DataSource" > url="jdbc:hsqldb:/home/diego/omar/3.0-beta1/data/registry/omar" > driverClassName="org.hsqldb.jdbcDriver" > username="sa" password="" > maxWait="3000" maxIdle="100" maxActive="50" > removeAbandoned="true" removeAbandonedTimeout="60" > logAbandoned="true"/> > </Context> > > When I try to start the server i get the following in catalina.out: > Cannot create JDBC driver of class '' for connect URL 'null' > at > org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource( > BasicDataSource.java:780) > ... > which I believe indicates that my resource params were ignored > (considering: class ''). > > I've tried versions 5.5.9 and 5.5.14-beta. I'm sure the file gets > digested (I had invalid docBase before and I could see the message) and > I'm also sure the jdbc driver jar is in common/lib. > > Has anybody succeeded with defining jdbc resource in a context file? Can > anybody spot what I am doing wrong? Do you have any hints on how/what to > debug to find out what's wrong? > > Thanks, > Diego > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Bruce Tong