You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ivan Jouikov <iv...@comcast.net> on 2004/07/02 10:32:52 UTC

Problems moving from server.xml to web.xml ...

I want to move <context> element from server.xml to web.xml, so I can add new applications without restarting the server.

Everything works fine, my DB and all, until I move this entry:
code: 
   _____  

  <Context path="/ablogic" docBase="C:\Documents and Settings\SysOp\My Documents\AB LOGIC\Eclipse Workspace\abLogic\web" debug="9" reloadable="true">
                
               <!-- Database -->
               <Resource name="jdbc/ablogic" auth="Container" type="javax.sql.DataSource"/>
               
               <ResourceParams name="jdbc/ablogic">
                       <!-- Max pool connections -->
                       <parameter><name>maxActive</name><value>5</value></parameter>
                       <!-- Max idle connections -->
                       <parameter><name>maxIdle</name><value>5</value></parameter>
                       <!-- Username -->
                       <parameter><name>username</name><value>ivan</value></parameter>
                       <!-- Password -->
                       <parameter><name>password</name><value>kittiesrcute</value></parameter>
                       <!--DB Driver -->
                       <parameter><name>driverClassName</name><value>com.mysql.jdbc.Driver</value></parameter>
                       <!--DB URL -->
                       <parameter><name>url</name><value>jdbc:mysql://192.168.0.1:3306/school?autoReconnect=true</value></parameter>
               </ResourceParams>
 
        </Context> 
   _____  



As soon as I move this thing, and try to use my DB, I get the following error:

Error message: Cannot create JDBC driver of class '' for connect URL 'null'

My mysql connector is both in my /common/lib and my /WEB-INF/lib/, just to keep it safe. Also, to my web.xml I added these two entries:
code: 
   _____  

 <ResourceLink name="jdbc/ablogic" global="jdbc/ablogic"/>
        
        <resource-ref>
               <description>DB Connection</description>
               <res-ref-name>jdbc/ablogic</res-ref-name>
               <res-type>javax.sql.DataSource</res-type>
               <res-auth>Container</res-auth>
        </resource-ref> 
   _____  



I have no idea what the hell is wrong. Theoretically, I am not changing anything by simply copying <context> element, yet, it seems to stop working .

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07.06.2004