Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Im using Netbeans 7.3, Windows 7, Postgres 9.2,
I created a Java Web project with Hibernate 3.2.5 (driver = postgresql-9.2-1002.jdbc4)

I added the new project with the postgres database info,
after I created the reverse engineering file with the NetBeans tool
and finally I used the Wizard "Hibernate Mapping Files and POJOS from Database..."
and it doesn't create the classes,
I tested it with MySql and It works prefect.

The problem is when I use Hibernate with Postgres.

share|improve this question
    
"Hibernate 3.2.5". Um. What? Why use an ancient patch release of an ancient major version of Hibernate rather than the latest in the 3.x series or preferably Hibernate 4? You're missing years of bugfixes. –  Craig Ringer May 13 '13 at 7:14
    
I updated my hibernate version to the last one and I still have the problem –  Hedu911 May 14 '13 at 5:04
add comment

3 Answers

I use this same environment (except for the Hibernate version).

When you go to the Services tab under Databases, does your JDBC connection to Postgres appear? If so, can you successfully connect to it an execute a query?

Under the 'New Hibernate Mapping Files and POJOS from Database' dialog, I assume you have the Code Generation Settings for Domain Code selected as well.

And .. does your hibernate.reveng.xml file have entries for elements? These map 1:1 to tables in your database.

share|improve this answer
    
yes, I'm able to see the JDBC connection and I can execute queries and my hibernate.reveng.xml file have my table entry –  Hedu911 May 14 '13 at 5:02
add comment

Uh,in your connect db ,must design database name , like jdbc:mysql://ip:3306/yourdb?useUnicode=true&characterEncoding=utf8 ,when reverse chose table one by one. try

share|improve this answer
add comment

Remember that Hibernate is case sensitive, but Netbeans, when you use the "Hibernate configuration wizard", and the "Hibernate Reverse Engeenering" creates de files with the database name in lowcase. If you change both files (xxxxxxx.cfg.xml and xxxxxxx.reveng.xml) I think it will work fine.

Regards

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.