[ale] MySQL and Java

Joe Knapka jknapka at kneuro.net
Sat Nov 15 03:09:47 EST 2003


"Emil P. Man" <admin at synban.com> writes:

> Hello ALErs,
> 
> I am trying to access MySQL through some Java applets. I do not have
> any experience with writing applets for MySQL yet. So here is my
> issue. I have downloaded the JDBC driver from MySQL's web site, and
> tried installing it. I installed java in /usr/local/java and I have
> put the JDBC driver in /usr/local/java/jre/lib/ext/ where they
> recommend to put it. I have also changed my CLASSPATH to the full path
> to the file (including the .jar file). After compiling and running an
> applet, it is still complaining to me about MySQL JDBC Driver not
> being found. I use NetBeans IDE but I run the java program from the
> command line, (after NetBeans compiles it). I have also mounted the
> .jar file into the filesystems in NetBeans as an archive. I am still
> experiencing this problem.

What is the *exact* exception message? If it is "no suitable
driver found", that probably means you've got the database
URL formatted wrong, so the MySQL JDBC driver is saying,
"I have no idea what this URL means". If it's a ClassNotFound error,
then your classpath is wrong. The proper URL format for
MySQL connections (from
<http://www.mysql.com/documentation/connector-j/index.html>) is

jdbc:mysql://[host][,failoverhost...][:port]/[database][?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]...

Cheers,

-- Joe

> So guys, I am stumped. Can anybody help?
> 
> Thanks in advance,
> Emil P. Man
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale



More information about the Ale mailing list