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

Reply via email to