6 messages in com.mysql.lists.javaRe: Driver error
FromSent OnAttachments
Susidzaimah Pg Sulaiman CS200010 Feb 2004 03:15 
Ricardo Lopes10 Feb 2004 04:33 
Mike Markovich10 Feb 2004 08:17 
Susidzaimah Pg Sulaiman CS200010 Feb 2004 08:31 
Jeff Mathis10 Feb 2004 08:36 
Susidzaimah Pg Sulaiman CS200010 Feb 2004 08:53 
Subject:Re: Driver error
From:Ricardo Lopes (lop@elevaconsult.pt)
Date:02/10/2004 04:33:00 AM
List:com.mysql.lists.java

This error is because the driver isnt in your classpath, you can:

a) add the driver jar to your classpath b) extract the driver jar to your program/servlet folder c) include the driver jar in your java lib folder (not recommended but works)

it seems that the compiler skip anything once it found

+++++++++++++ Class.forName("org.gjt.mm.mysql.Driver").newInstance(); connection = DriverManager.getConnection("jdbc:mysql://devweb.cis.strath.ac.uk/" + user + "?user=" + user + "&password=" + password); +++++++++++++++

in the try statement and goes straight to catch statement. is possible because of my JDBC driver? but I have tested the JDBC driver in a simple java program (not servlet) and it does connect to mySQL database.

regards susi sulaiman

Maria Dolores Moral wrote:

Hi again I don't know very much about mysql, but I think you must especified the port and DB. Print something before the place where you made:

connection=DriverManager.getConnection ... System.out.printl("Pass");

If you can see it, try it:

connection=DriverManager.getConnection("jdbc:mysql://devweb.cis.strath.ac.uk :3306/<DB>"

+ user + "?user=" + user + "&password=" + password);