Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hibernate returns error "Class path must be set or restored default"

I am new to Java application based on Hibernate technology. I get some problems in installing my system. I am installed in my friends system. I installed JBOSS Tools (in that only Hibernate tools) in Eclipse Juno (Portable).

I just copied that folder in to my system and I run the Eclipse.exe file and it runs smooth and I am trying to create new Hibernate Configuration file in hibernate perspective.

But I got below error:

Class path must be set or restored default

Image

like image 838
mani Avatar asked Oct 26 '12 11:10

mani


1 Answers

You need to add the database driver to your classpath

1) Download the driver for your database (e.g. if you are trying to connect to MySQL you can get it from http://dev.mysql.com/downloads/connector/j/ )

2) Point to it by clicking 'Add external jars' and selecting it from the place you downloaded it to OR First add it to the project, and then select it by through 'Add Jars' (recommended)

like image 52
Joseph Rajeev Motha Avatar answered Sep 19 '22 04:09

Joseph Rajeev Motha