tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Jacobson <marti...@libero.it>
Subject Re: Tomcat, MySQL & JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null'
Date Mon, 15 Sep 2003 12:00:52 GMT
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


Mime
View raw message