E
elektrophyte
I'm using Tomcat 5.5.9 on Windows 2000. I get the error below when I
try to visit a page of my app that accesses the DB.
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.
I notice that the Tomcat distribution also includes the
suggestively-named directory "shared\lib". I've never heard anyone say
that's the right one, but if you have a database driver that is clearly
a "library" and you want it to be available, or "shared" by all your
applications, then "shared\lib" might be a reasonable place to put it.
However I tried it and got the same error.
If anyone has any insight into the issues mentioned I'd be grateful to
hear it.
Thanks,
E
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)
try to visit a page of my app that accesses the DB.
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.
I notice that the Tomcat distribution also includes the
suggestively-named directory "shared\lib". I've never heard anyone say
that's the right one, but if you have a database driver that is clearly
a "library" and you want it to be available, or "shared" by all your
applications, then "shared\lib" might be a reasonable place to put it.
However I tried it and got the same error.
If anyone has any insight into the issues mentioned I'd be grateful to
hear it.
Thanks,
E
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)