I think I know where lies the problem, however I still don't know how to fix it...

I use the sample build.xml file from Tomcat: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/build.xml.txt to install, reload and distribute my sample application.

When I do an ant -install it apparantly installs the application in the Tomcat manager, however the application doesn't show up in the webapps directory. That's 1.

So maybe there's a conflict with either the context path, which I don't think so, since my build file has explicitly set the context path to /DBTest:

<property name="app.name" value="DBTest"/>
<property name="app.path" value="/${app.name}"/>
<property name="app.version" value=""/>
<property name="build.home" value="${basedir}/build"/>
<property name="catalina.home" value="/Library/Tomcat"/> <!-- UPDATE THIS! -->
<property name="dist.home" value="${basedir}/dist"/>
<property name="docs.home" value="${basedir}/docs"/>
<property name="manager.url" value="http://localhost:8080/manager"/>
<property name="src.home" value="${basedir}/src"/>
<property name="web.home" value="${basedir}/web"/>


Or there's a conflict with the docbase, which I suspect... However I'm not sure why and how to fix it....

Because when I put the generated war file (when doing an ant -dist) in the webapps directory the connection works! Although this works, it's not very convenient, since it defeats the purpose of the automated installing through ant...

Hope I made myself clear?

From: Martin Jacobson <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Re: Tomcat, MySQL & JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null'
Date: Mon, 15 Sep 2003 14:00:52 +0200


Ilja wrote:
Ok, first some configuration information:

Tomcat 5.09
MySQL Driver 3.08 stable
OS: Mac OSX 10.2.6
J2SE 1.4.2


My config is not the same (TC 4.1.24, OSX 10.2.6, MySQL 3.07), and my parameters are different:
<ResourceParams name="jdbc/EuratomDB">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>30000</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>100</value>
</parameter>
<parameter>
<name>username</name>
<value>xxx</value>
</parameter>
<parameter>
<name>password</name>
<value>xxx</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost/euratom?autoReconnect=true</value>
</parameter>
</ResourceParams>


This works for me! The main diffs are (i) I specify the <factory>, and (ii), the driverClassName is com.mysql.jdbc.Driver

However, the exception seems to suggest that the correct factory is being used by default. Your driverClassName is the old name, and might not be in the jar file any more.

HTH
Martin


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________ MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to