Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MySQL Beginner Has Problem With Loading JDBC Driver

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am having problem with loading JDBC driver, and need your diagnotic help.
1. I have installed MySQL (C:\mysql), created a databse (soup), and created a little table (VIDEOS). I am able to see the table in the console:
sql>select * from videos
2. I have downloaded the latest version of Connector/J (mysql-connector-java-3.1.0-alpha.zip), and unzip the zip file into my C:\ directory.
3. I copied the mysql-connector-java-3.1.0-alpha-bin.jar to the C:\j2sdk1.4.1_02\jre\lib\ext folder and it is in my CLASSPATH
4. MySQL server is running
C:\> C:\mysql\bin\mysqld-nt --standalone
5. open another DOS window and use the database
mysql>USE SOUP
6. succesfully compiled a Java program (javac Test.java):

7. when I run the Java program (java Test), I got
the message:
could not load JDBC driver: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
What am I missing?
[ March 21, 2003: Message edited by: JiaPei Jen ]
[ March 21, 2003: Message edited by: JiaPei Jen ]
[ March 21, 2003: Message edited by: JiaPei Jen ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps something is different or wrong with the alpha JConnector driver you're using. What happens when using the stable version 3.0.6?
Also, how are you running the app? From the command line or through an IDE? and which IDE?
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
org.gjt.mm.mysql.Driver is for the old mm.MySQL Driver that has now become Connector/J.
Try using com.mysql.jdbc.Driver instead.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic