Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jdbc Driver Not Found [duplicate]

We are working on a project in netbeans using Java which uses mysql database to process some common queries. But I am having issues with loading jdbc drivers for mysql in netbeans. It is giving following error:

Class Not Found Exception : com.jdbc.mysql.Driver please help me out.

like image 663
Babanna Duggani Avatar asked Mar 30 '12 05:03

Babanna Duggani


2 Answers

You just have to add the MySQL JDBC connector to your project. It would be similar for an Oracle database, for example (you would have to add the ojdbc6.jar).

For MySQL, you have to get the MySQL JDBC connector and add it to your project's classpath.

  • Get the MySQL JDBC connector, either on the MySQL site, either adding it through a Maven dependency (if your project is driven by Maven), check the official MySQL site. The current version as of May 2012 is 5.1.19 (works with any version of MySQL);
  • Add it to your Netbeans classpath, in the project properties. Check the online Netbeans configuration about project classpath if needed
like image 120
SRG Avatar answered Nov 14 '22 21:11

SRG


When your suffering from this kind of problem then you need to check MySQL version is updated or corrected . If your are working on normal program then add MySQL jar version 5.1.32 or if you used maven structure then you used this dependency

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.32</version>
</dependency>

I hope that it will work on your problem.....

like image 35
Darshan Avatar answered Nov 14 '22 23:11

Darshan