12 messages in com.mysql.lists.javaMM Mysql driver problem| From | Sent On | Attachments |
|---|---|---|
| Graham Clark | 07 Aug 2002 03:42 | |
| Filip Rachunek | 07 Aug 2002 03:47 | |
| Graham Clark | 07 Aug 2002 04:02 | |
| Filip Rachunek | 07 Aug 2002 04:06 | |
| Fabian Sommer | 07 Aug 2002 04:19 | |
| Fabian Sommer | 07 Aug 2002 04:19 | |
| Graham Clark | 07 Aug 2002 04:48 | |
| Moritz Petersen | 07 Aug 2002 04:50 | |
| Fabian Sommer | 07 Aug 2002 04:53 | |
| Steve Forsyth | 07 Aug 2002 08:38 | |
| William R. Mussatto | 07 Aug 2002 08:42 | |
| Steve Forsyth | 07 Aug 2002 08:48 |
| Subject: | MM Mysql driver problem![]() |
|---|---|
| From: | Graham Clark (ggc...@ecs.soton.ac.uk) |
| Date: | 08/07/2002 03:42:06 AM |
| List: | com.mysql.lists.java |
Hi,
I've been trying to convert a servlet that used the standard JDBC-ODBC driver (connecting to an Access database) to one that uses your MM MySQL driver (connecting to a MySQL database obviously). It's a simple test program that just SELECTs all the rows in a table.
I changed the Class.forName() argument from "sun.jdbc.odbc.JdbcOdbcDriver" to "org.gjt.mm.mysql.Driver" (and added the newInstance() call on the end), and the url of the database from "jdbc:odbc:survey" to "jdbc:mysql//localhost/survey?user=[user]&password=[password]".
As far as I can see these are the only lines that need to change, but the program now throws a ClassNotFoundException when run.
MySQL is running as a service on my machine (localhost), and I am running Tomcat (although not on localhost, but on my computer through a LAN). When I print the stack trace of the exception, the mm.mysql code is not getting called anywhere. (i'm running windows 2000.)
I've tried various methods of putting the MM MySQL driver in my classpath, referencing both the physical directories and the jar file (though not at the same time). What am I doing wrong?
Any help would be very much appreciated. Thanks,
Graham Clark. ______ _ _ _ _
Intelligence, Agents and Multimedia Research Group Department of Electronics and Computer Science University of Southampton Hampshire England




