Questions tagged [hibernate-tools]

Hibernate Tools is a toolset for Hibernate implemented as an integrated suite of Eclipse plugins, together with a unified Ant task for integration into the build cycle. Hibernate Tools is a core component of JBoss Tools and hence also part of JBoss Developer Studio.

Working with Hibernate is very easy and developers enjoy using the APIs and the query language. Even creating mapping metadata is not an overly complex task once you've mastered the basics. Hibernate Tools makes working with Hibernate or JPA even more pleasant.

Hibernate Tools is a toolset for Hibernate implemented as an integrated suite of Eclipse plugins, together with a unified Ant task for integration into the build cycle. Hibernate Tools is a core component of JBoss Tools and hence also part of JBoss Developer Studio.

The following features are available within Eclipse :

Mapping Editor : An editor for Hibernate XML mapping files, supporting auto-completion and syntax highlighting. The editor even supports semantic auto-completion for class names, property/field names, table names and column names.

Console : The Hibernate Console perspective allows you to configure database connections, provides visualization of classes and their relationships and allows you to execute HQL queries interactively against your database and browse the query results.

Reverse Engineering : The most powerful feature of Hibernate Tools is a database reverse engineering tool that can generate domain model classes and Hibernate mapping files, annotated EJB3 entity beans, HTML documentation or even an entire JBoss Seam application in seconds!

Wizards : Several wizards are provided, including wizards to quickly generate Hibernate configuration (cfg.xml) files, and Hibernate console configurations.

Ant task : The Hibernate3 tools include a unified Ant task that allows you to run schema generation, mapping generation, or Java code generation as part of your build.

Links :
Hibernate Tools
JBoss Tools Eclipse Plugins
JBoss Tools Documentation
JBoss Tools Movies

198 questions
129
votes
13 answers

How to install Hibernate Tools in Eclipse?

What is the proper way to install Hibernate Tools in Eclipse as a plugin? The Hibernate site doesn't really give any instructions. Looking at the Hibernate Tools binary HibernateTools-3.2.4.Beta1-R200810311334.zip, it appears that I can just unzip…
Steve Kuo
  • 61,876
  • 75
  • 195
  • 257
18
votes
2 answers

Hibernate Tools: Error parsing JNDI name

We are trying to upgrade from Hibernate 3.6.7 to 4.1.2 and Hibernate Tools 3.2.0 to 3.5.0 We generate a DB creation script using Ant:
Matteo
  • 14,696
  • 9
  • 68
  • 106
15
votes
3 answers

How to install Hibernate Tools into Eclipse Luna?

I'm using Eclipse Luna, I want to create a web app and use Hibernate for my data. In Eclipse Marketplace I found Hibernate Tools for Indigo or Helios but not for Luna. I found just Red Hat JBoss Developper Studio for Luna ( what's that ?).
mingo90
  • 171
  • 1
  • 1
  • 5
14
votes
3 answers

How to configure hibernate-tools with maven to generate hibernate.cfg.xml, *.hbm.xml, POJOs and DAOs

can any one tell me how to force maven to precede mapping .hbm.xml files in the automatically generated hibernate.cfg.xml file with package path? My general idea is, I'd like to use hibernate-tools via maven to generate the persistence layer for my…
mmm
  • 1,277
  • 5
  • 18
  • 34
12
votes
6 answers

org.hibernate.AnnotationException: Collection has neither generic type or OneToMany.targetEntity()

I used Hibernate Tools to generate my Hibernate POJO mapping. Unfortunately the code generated by Hibernate tools seems not to work, I get the exception org.hibernate.AnnotationException: Collection has neither generic type or…
Jeremy S.
  • 6,423
  • 13
  • 48
  • 67
10
votes
3 answers

Hibernate Tools "Duplicate class" error on reverse engineering

I am trying to reverse engineer a SQL Server 2005 using Hibernate Tools and am getting a strange error: org.hibernate.cfg.JDBCBinderException: Duplicate class name 'CheckConstraints' generated for …
Daniil Shevelev
  • 11,739
  • 12
  • 50
  • 73
9
votes
10 answers

Hibernate: An AnnotationConfiguration instance is required to use ... error

I build my HibernateUtil this way : public class HibernateUtil { private static final SessionFactory sessionFactory; static { try { // Create the SessionFactory from standard (hibernate.cfg.xml) config…
Valter Silva
  • 16,446
  • 52
  • 137
  • 218
9
votes
1 answer

How to generate domain objects with annotations using hibernate tools

I use Eclipse Hibernate Tools to create domain classes starting from my database and need to add JPA annotations. Is there a way to add annotations? Possibly with reveng.xml and Reverse Engineering? How should this be done? Generated domain…
Dimitri Dewaele
  • 10,311
  • 21
  • 80
  • 127
7
votes
4 answers

Can Hibernate tool generate JPA POJO?

May I know can the Eclipse plugin Hibernate tool use to generate JPA entity @entity? The Java files that generated look like below and not JPA: package com.test.only.model; // Generated Jul 19, 2011 12:13:40 PM by Hibernate Tools…
cometta
  • 35,071
  • 77
  • 215
  • 324
6
votes
1 answer

Hibernate tool, reverse engineering

I have the following question about Hibernate tools and the configuration : I configure the hibernate to genrate JPA classes from the database with reverse engineering like this : hibernate.cfg.xml
Mirea Vasile
  • 421
  • 1
  • 8
  • 12
6
votes
2 answers

Problem with reverse engineering a many-to-one unidirectional association with hibernate tools

I'm using Hibernate tools 3.40 in Eclipse (Helios). I'm trying to generate POJOs from my DB (MSSQL 2008) with EJB3 style (i.e. JPA2.0 annotations). Let's say I have two tables A and B where there is a foreign key from A to B. This generates, by…
Ittai
  • 5,625
  • 14
  • 60
  • 97
6
votes
4 answers

How to change name of Hibernate Tools reverse engineerd DAO class?

So im trying to use Hibernate Tools to reverse engineer my database and I am just getting into using Freemarker templates to weak the code it generates. The problem is I want to change the name of the DAO classes it generates. By default the DAO…
3urdoch
  • 7,192
  • 8
  • 42
  • 58
6
votes
6 answers

PersistenceException: No persistence provider found for schema generation for persistence-unit named default

I have tried to set up a gradle task that runs a java main class that is intended to generate a SQL schema. I have no persistence.xml configuration file. Here is my configuration and code: My gradle task: task JpaSchemaExport(type: JavaExec){ …
balteo
  • 23,602
  • 63
  • 219
  • 412
6
votes
1 answer

Hibernate Tools: Exception when Foreign Key is mapped to two different tables

I'm running the Hibernate Tools against a DB2 database that permits the same foreign key name to be used in two different tables, each related to the same PK in another table. When the tool attempts to read the schema, it throws the following…
jmarks
  • 655
  • 6
  • 16
5
votes
3 answers

Annotation not created when generating Hibernate mapping files

I am following this link to generate hibernate file https://www.mkyong.com/hibernate/how-to-generate-code-with-hibernate-tools/ the files are generated but without annotation. I checked the "generate EJB3 annotation " but still it is not…
RMagen
  • 612
  • 2
  • 9
  • 23
1
2 3
13 14