This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Error in reverse engineering from an existing database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Error in reverse engineering from an existing database" Watch "Error in reverse engineering from an existing database" New topic
Author

Error in reverse engineering from an existing database

Sumit Bisht
Ranch Hand

Joined: Jul 02, 2008
Posts: 329

Hi All!

I am using hibernate tools in Eclipse helios to reverse engineer hibernate mappings and POJOs from an existing DB2 express - C database.
However, using the same configuration, I am unable to do that via ant build .
As soon as I invoke an exporter, the connection is forcibly closed.



My build file contains the following :

My intent is to generate JPA annotation based entities ,but so far, nothing is working without the wizard. Should I use a custom <hbmtemplate> task instead?
If anyone has gone through a similar experience, please share.
Sumit Bisht
Ranch Hand

Joined: Jul 02, 2008
Posts: 329

Update : This error has been resolved after I had specified autocommit to true in my hibernate.properties file.

hibernate.connection.autocommit=true

Still, the setup is unable to generate JPA entities from the database as <jpaconfiguration> configuration cannot co-exist with the <jdbcconfiguration> configuration.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Error in reverse engineering from an existing database
 
Similar Threads
hibernate with HSQL db - Acquisition Attempt Failed Error
jdk5 and ejb3 options unavailable in HibernateTools-3.2.4.GA
hibernate, ant task, hbm2java, code generation and circular dendency?
Classpath problems(?)
Hibernate reverse engineering Ant script