Re: Tomcat 5.5.9, correct directory for DB driver?
- From: Juha Laiho <Juha.Laiho@xxxxxx>
- Date: Sun, 25 Sep 2005 18:53:24 +0000 (UTC)
"elektrophyte" <moctile@xxxxxxxxx> said:
>I've tried putting the DB driver "mysql-connector-java-3.1.8-bin.jar"
>in these locations:
>
>[TOMCAT_HOME]\common\lib
>[TOMCAT_HOME]\common\endorsed
>[TOMCAT_HOME]\webapps\agenda\WEB-INF\lib
>C:\Program Files\Java\jdk1.5.0_01\jre\lib\ext
>
>These are all directories that have been recommended in books, in
>Tomcat docs, or in newsgroups as the place to put jar files like DB
>drivers. I don't know if one, some, none, or all is the right
>directory. In fact it seems to be one of the great mysteries of the
>universe. Maybe there's an old guy sitting on top of a mountain in
>Tibet who knows what the correct directory for database drivers is.
Read, and re-read, the Tomcat classloading documentation. Digesting
it will take some time - just accept that.
Then, if you create the database connections as you should (i.e.
by using the jdbc connection pooling support provided by Tomcat,
instead of creating the connections within your application),
place the library in common/lib. And make sure you don't have
compies of the library elsewhere -- there could be one hiding in
the Tomcat work directory for your webapp.
>The error -->
>================================================================
>Cannot create JDBC driver of class '' for connect URL 'null'
>org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
>driver of class '' for connect URL 'null'
>
>[...]
>
>Caused by: java.sql.SQLException: No suitable driver
> at java.sql.DriverManager.getDriver(DriverManager.java:243)
.... but this somewhat looks like there isn't even an attempt to
load the mysql driver -- which could be caused by a bug in your
configuration.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
.
- Follow-Ups:
- Re: Tomcat 5.5.9, correct directory for DB driver?
- From: elektrophyte
- Re: Tomcat 5.5.9, correct directory for DB driver?
- References:
- Tomcat 5.5.9, correct directory for DB driver?
- From: elektrophyte
- Tomcat 5.5.9, correct directory for DB driver?
- Prev by Date: Re: Tomcat 5.5.9, correct directory for DB driver?
- Next by Date: Re: Large Cookie Problem
- Previous by thread: Re: Tomcat 5.5.9, correct directory for DB driver?
- Next by thread: Re: Tomcat 5.5.9, correct directory for DB driver?
- Index(es):
Relevant Pages
|