Generating a Hibernate Mapping file with Hibernate Synchronizer in Eclipse

This is one way to generate an Hibernate Mapping file using the Hibernate Synchronizer plugin in Eclipse.

I assume you will want to put your mapping files in your WEB-INF/classes directory, so it will be picked up in the classpath.

1. Right Click the “classes” directory and choose New->Other->Hibernate Mapping File

Hibernate Mapping Screenshot

2. Next fill the appropriate settings; for example-

Hibernate Mapping Screenshot

And hit “Refresh”. If the information you entered is correct and the database connection succeeds, you will be presented with the option to choose which table you would like to generate a Hibernate mapping.

Hibernate Mapping Screenshot

Choose your package and the .hbm.xml file will be generated in your WEB-INF/classes.

2 Comments

  1. This is good.

    While configuring HibernateMappingFile (click on Refresh)we are getting Error like(This is mostly due to URL not matching the expected value by JDBC driver )

    Thank you.

    Comment by Gopi — December 2, 2006 @ 12:15 am

  2. This article is very good .

    Comment by Gopi — December 3, 2006 @ 9:51 pm

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.

ServiceCycle is a registered trademark of Supergloo, inc..