jaya
jaya

Reputation: 1

JPA connection error with database

Unable to locate JAR/zip in file system as specified by the driver definition: mysql-connector-java-5.1.0-bin.jar. is the error im getting when i try to connect my jpa project with the database. and it is prompting ping failed. please resolve my problem

Upvotes: 0

Views: 697

Answers (1)

Talib Hussain
Talib Hussain

Reputation: 1344

there is a multiple scenario please post in brief.

if you have maven in your project add following dependency

<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>

update your project

if you dont have maven download jar file from following path, https://mvnrepository.com/artifact/mysql/mysql-connector-java/5.1.6

add it to your build path, clean your project

if you are using eclise editor while creating connection to indatabase explorer it require jar file too, select mysql jconnector from dropdown add name then add jar file it will automatically populate the driver class. click test on success finish.

hope this will help

Upvotes: 1

Related Questions