• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

MySQL Beginner Has Problem With Loading JDBC Driver

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic