0% found this document useful (0 votes)
75 views

Hibernate Configuration Step by Step Process

This document provides a tutorial for performing Hibernate reverse engineering in Eclipse. It explains how to install the Hibernate plugin in Eclipse, create a project structure with the required JAR files, set up a MySQL database with sample tables, and generate Java classes from the database using the Hibernate reverse engineering tool.

Uploaded by

swapnil daf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views

Hibernate Configuration Step by Step Process

This document provides a tutorial for performing Hibernate reverse engineering in Eclipse. It explains how to install the Hibernate plugin in Eclipse, create a project structure with the required JAR files, set up a MySQL database with sample tables, and generate Java classes from the database using the Hibernate reverse engineering tool.

Uploaded by

swapnil daf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Java – Hibernate reverse engineering eclipse tutorial:

Site URL: http://omtlab.com/java-hibernate-reverse-engineering-eclipse-tutorial/

This tutorial explain how to perform hibernate reverse engineering using eclipse.

First of all before we start you need to install Hibernate Plugin in Eclipse

Goto this link : http://download.jboss.org/jbosstools/updates/stable/

Select one option. Here i selected following option because i am using Eclipse Indigo ::: >>

JBoss Tools 3.3 Development Milestone (requires Eclipse 3.7.2 Indigo SR2)

Now copy page URL and Goto Help > Install New Software.. paste URL in Work with Textbox as shown in

below image.
Create Project Structure as shown in below image.

Here i create new project with name omtHibernate and package com.omt.main.

Here we require three jar files as shown in above image.


1.hibernate3.jar

2.javax.persistence.jar

3.mysql-connector-java-5.1.21-bin.jar

Now open hibernate perspective Goto Window > Open Perspective > Other.. as shown in below image.

Select Hibernate.
Now Create Database. Here i use mysql to create database.

My Schema name is omthibernate that contains two tables

1. student

2. address

Following images display properties of these two tables.

1. student table :
add foreign key in student table as shown in below image.

2. address table :

Press right click on src folder and create new hibernate.cfg.xml file.
Add following properties in it.
Press Next and then press Finish button.

Press right click on project folder and create new file in project folder hibernate.reveng.xml as shown in

below image.
Add Following properties in it.
Now select top most small icon and select Hibernate Code Generation Configuration… as shown in below

image.

You might also like