Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Apache Tomcat
|
Apache Tomcat General discussion of the Apache Tomcat servlet container. For discussions specific to the Professional Apache Tomcat book, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 29th, 2004, 11:57 AM
Registered User
 
Join Date: Jan 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cannot load JDBC driver class with com.mysql.jdbc.

 Can't seem to connect to a MySQL dB using the mysql-connector-java-3.0.10-stable.jar thru tomcat 4.1
Could someone lend a hand, or at least point me in the right direction?
I had everything that Tomcat How-To said ...

web.xml
<resource-ref>
<description> Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. </description>
<res-ref-name>jdbc/weblogic</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

server.xml

<Context path="/Exames" docBase="Exames"
debug="5" reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_Exames_log." suffix=".txt"
timestamp="true"/>
<Resource name="jdbc/weblogic"
auth="Container"
type="javax.sql.DataSource"/>




<ResourceParams name="jdbc/weblogic">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFact ory</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>30</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>username</name>
<value>teatica</value>
</parameter>
<parameter>
<name>password</name>
<value>teatica</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/teatica?autoReconnect=true</value>
</parameter>
</ResourceParams>
</Context>

ResourceLink is commented because Tomcat don't start ...






Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server 2000 Driver for JDBC Errors cash Java Databases 2 December 22nd, 2006 01:18 AM
Exception while loading JDBC driver dshashi1234 Java Databases 0 December 21st, 2006 02:34 AM
JDBC Driver not loaded arun_sunmic Apache Tomcat 1 April 8th, 2006 04:09 AM
java.sql.SQLException: Error loading JDBC Driver jdphjp Java Databases 1 August 5th, 2004 12:46 AM
Cannot load JDBC driver class with com.mysql.jdbc. dzis MySQL 0 January 29th, 2004 11:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.