|
From: Tom K <tk...@co...> - 2004-05-10 04:26:11
|
The problem is the line: jdbc.driverClassName=org.gjt.mm.mysql.Driver
Should be: jdbc.driverClassName=com.mysql.jdbc.Driver
The author of the ConnectorJ version 3.0 and above uses a different
driver class name because of a change in the license for the driver.
See my previous email for the error in load script too.
Tom Kochanowicz
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf
Of alula
Sent: Sunday, May 09, 2004 10:06 PM
To: springframework-developer-request; springframework-developer
Subject: [Springframework-developer] sample jpetstore exception on
connect to mysql
I configure war/WEB-INF/jdbc.properties as below:
jdbc.driverClassName=org.gjt.mm.mysql.Driver
jdbc.url=jdbc:mysql://localhost:3306/petclinic
and modify the build.xml in order to embrace the mysql connect file:
mysql-connector-java-3.1.1-alpha-bin.jar
after ant all, I looked that the mysql-connector-java-3.1.1-alpha-
bin.jar file is in the jpetstore.war, then I put the jpetstore.war to
$TOMCAT_HOME/webapps directory, I type the
http://localhost:8080/jpetstore in browser the index file displayed
well, but when it access database it has the exception as below:
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not
get JDBC connection; nested exception is
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver
class 'org.gjt.mm.mysql.Driver '
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver
class 'org.gjt.mm.mysql.Driver ', cause:
java.lang.ClassNotFoundException: org/gjt/mm/mysql/Driver
at java.lang.Class.forName0(Native Method
how can I should do ? why it could not find the Class:
org/gjt/mm/mysql/Driver
I list the file mysql-connector-java-3.1.1-alpha-bin.jar below:
0 Fri Feb 13 14:26:00 CST 2004 META-INF/
106 Fri Feb 13 14:25:58 CST 2004 META-INF/MANIFEST.MF
19794 Fri Feb 13 14:25:18 CST 2004 COPYING
1113 Fri Feb 13 14:25:14 CST 2004 README
0 Fri Feb 13 14:25:14 CST 2004 com/
0 Fri Feb 13 14:25:14 CST 2004 com/mysql/
0 Fri Feb 13 14:25:50 CST 2004 com/mysql/jdbc/
826 Fri Feb 13 14:25:42 CST 2004
com/mysql/jdbc/AssertionFailedException.class
2956 Fri Feb 13 14:25:42 CST 2004 com/mysql/jdbc/Blob.class
6863 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/BlobFromLocator.class
4615 Fri Feb 13 14:25:48 CST 2004 com/mysql/jdbc/Buffer.class
8940 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/ByteArrayBuffer.class
872 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/CallableStatement$CallableStatementParam.class
20061 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/CallableStatement.class
9780 Fri Feb 13 14:25:48 CST 2004 com/mysql/jdbc/ChannelBuffer.class
4617 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/CharsetMapping.class
4560 Fri Feb 13 14:25:48 CST 2004 com/mysql/jdbc/Clob.class
3975 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/CommunicationsException.class
3328 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/CompressedInputStream.class
20392 Fri Feb 13 14:25:44 CST 2004
com/mysql/jdbc/Connection$UltraDevWorkAround.class
37909 Fri Feb 13 14:25:46 CST 2004 com/mysql/jdbc/Connection.class
372 Fri Feb 13 14:25:46 CST 2004
com/mysql/jdbc/ConnectionProperties$1.class
2071 Fri Feb 13 14:25:46 CST 2004
com/mysql/jdbc/ConnectionProperties$BooleanConnectionProperty.class
4327 Fri Feb 13 14:25:46 CST 2004
com/mysql/jdbc/ConnectionProperties$ConnectionProperty.class
3013 Fri Feb 13 14:25:46 CST 2004
com/mysql/jdbc/ConnectionProperties$IntegerConnectionProperty.class
2131 Fri Feb 13 14:25:46 CST 2004
com/mysql/jdbc/ConnectionProperties$StringConnectionProperty.class
28038 Fri Feb 13 14:25:46 CST 2004
com/mysql/jdbc/ConnectionProperties.class
380 Fri Feb 13 14:25:48 CST 2004 com/mysql/jdbc/Constants.class
3606 Fri Feb 13 14:25:46 CST 2004
com/mysql/jdbc/DatabaseMetaData$TypeDescriptor.class
66532 Fri Feb 13 14:25:46 CST 2004
com/mysql/jdbc/DatabaseMetaData.class
718 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/DocsConnectionPropsHelper.class
688 Fri Feb 13 14:25:48 CST 2004 com/mysql/jdbc/Driver.class
5276 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/EscapeProcessor.class
411 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/EscapeProcessorResult.class
2188 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/EscapeTokenizer.class
9051 Fri Feb 13 14:25:48 CST 2004 com/mysql/jdbc/Field.class
1290 Fri Feb 13 14:25:48 CST 2004 com/mysql/jdbc/Messages.class
8339 Fri Feb 13 14:25:18 CST 2004 com/mysql/jdbc/Messages.properties
1316 Fri Feb 13 14:25:48 CST 2004 com/mysql/jdbc/MiniAdmin.class
5057 Fri Feb 13 14:25:48 CST 2004 com/mysql/jdbc/MysqlDefs.class
43631 Fri Feb 13 14:25:48 CST 2004 com/mysql/jdbc/MysqlIO.class
1582 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/MysqlSavepoint.class
1802 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/NamedPipeSocketFactory$NamedPipeSocket.class
1339 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/NamedPipeSocketFactory$RandomAccessFileInputStream.clas
s
1266 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/NamedPipeSocketFactory$RandomAccessFileOutputStream.cla
ss
1798 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/NamedPipeSocketFactory.class
6122 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/NonRegisteringDriver.class
392 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/NotImplemented.class
798 Fri Feb 13 14:25:50 CST 2004 com/mysql/jdbc/NotUpdatable.class
165 Fri Feb 13 14:25:42 CST 2004
com/mysql/jdbc/OutputStreamWatcher.class
829 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/PacketTooBigException.class
1218 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/PreparedStatement$BatchParams.class
647 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/PreparedStatement$EndPoint.class
3782 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/PreparedStatement$ParseInfo.class
35101 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/PreparedStatement.class
55641 Fri Feb 13 14:25:44 CST 2004 com/mysql/jdbc/ResultSet.class
5555 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/ResultSetMetaData.class
1059 Fri Feb 13 14:25:48 CST 2004 com/mysql/jdbc/RowData.class
708 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/RowDataDynamic$OperationNotSupportedException.class
6129 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/RowDataDynamic.class
2768 Fri Feb 13 14:25:50 CST 2004 com/mysql/jdbc/RowDataStatic.class
6373 Fri Feb 13 14:25:50 CST 2004 com/mysql/jdbc/SQLError.class
4172 Fri Feb 13 14:25:50 CST 2004 com/mysql/jdbc/Security.class
1063 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/ServerPreparedStatement$BatchedBindValues.class
1018 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/ServerPreparedStatement$BindValue.class
24400 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/ServerPreparedStatement.class
3237 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/SingleByteCharsetConverter.class
379 Fri Feb 13 14:25:48 CST 2004 com/mysql/jdbc/SocketFactory.class
4111 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/StandardSocketFactory.class
751 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/Statement$CachedResultSetMetaData.class
20567 Fri Feb 13 14:25:48 CST 2004 com/mysql/jdbc/Statement.class
8406 Fri Feb 13 14:25:50 CST 2004 com/mysql/jdbc/StringUtils.class
31817 Fri Feb 13 14:25:50 CST 2004 com/mysql/jdbc/TimeUtil.class
25663 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/UpdatableResultSet.class
565 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/Util$RandStructcture.class
5095 Fri Feb 13 14:25:50 CST 2004 com/mysql/jdbc/Util.class
792 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/WatchableOutputStream.class
702 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/WatchableWriter.class
153 Fri Feb 13 14:25:48 CST 2004 com/mysql/jdbc/WriterWatcher.class
0 Fri Feb 13 14:25:14 CST 2004 com/mysql/jdbc/jdbc2/
0 Fri Feb 13 14:25:50 CST 2004 com/mysql/jdbc/jdbc2/optional/
9152 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.class
1216 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/jdbc2/optional/MysqlConnectionPoolDataSource.class
5788 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/jdbc2/optional/MysqlDataSource.class
2955 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/jdbc2/optional/MysqlDataSourceFactory.class
2964 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.class
9681 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.class
7935 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/jdbc2/optional/StatementWrapper.class
897 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/jdbc2/optional/WrapperBase.class
0 Fri Feb 13 14:25:50 CST 2004 com/mysql/jdbc/log/
5824 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/log/Jdk14Logger.class
489 Fri Feb 13 14:25:46 CST 2004 com/mysql/jdbc/log/Log.class
1837 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/log/Log4JLogger.class
2889 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/log/LogFactory.class
1908 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/log/NullLogger.class
5855 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/log/StandardLogger.class
0 Fri Feb 13 14:25:48 CST 2004 com/mysql/jdbc/profiler/
1724 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/profiler/ProfileEventSink.class
5837 Fri Feb 13 14:25:48 CST 2004
com/mysql/jdbc/profiler/ProfilerEvent.class
0 Fri Feb 13 14:25:50 CST 2004 com/mysql/jdbc/util/
636 Fri Feb 13 14:25:48 CST 2004 com/mysql/jdbc/util/LRUCache.class
802 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/util/PropertiesDocGenerator$DocProperties.class
917 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/util/PropertiesDocGenerator.class
5026 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/util/ServerController.class
1894 Fri Feb 13 14:25:50 CST 2004
com/mysql/jdbc/util/TimezoneDump.class
0 Fri Feb 13 14:25:16 CST 2004 org/
0 Fri Feb 13 14:25:16 CST 2004 org/gjt/
0 Fri Feb 13 14:25:16 CST 2004 org/gjt/mm/
0 Fri Feb 13 14:25:50 CST 2004 org/gjt/mm/mysql/
336 Fri Feb 13 14:25:50 CST 2004 org/gjt/mm/mysql/Driver.class
279 Fri Feb 13 14:26:02 CST 2004 META-INF/INDEX.LIST
-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
|