I just entered a problem report re: this behavior. The config path is are being confused but that is not the problem. The problem is that Configuration#configure() is unable to find the default “hibernate.cfg.xml” file. The reason for this is that the Configuration class expects hibernate.cfg.xml to be on the classpath and in a root directory. So rather than place the hibernate.cfg.xml file in the project’s root folder place it in the root level of the project’s Java source folder.
For example my test project looks like this:
TestHbmProject
/src
/bin
/lib
My hibernate.cfg.xml file resides at /src/hibernate.cfg.xml. The wizards are being upgraded to detect when the project’s hibernate config file is not on the classpath.
Also please note that when you use the DB Explorer’s “export thru hibernate” feature that the hibernate.cfg.xml is not currently updated. You must add the <mapping resource=”com/test/MyClass.hbm.xml”/> entry by hand. This capability is being implemented now and will be in the upcoming GA release.