I am using Hibernate release 3.0.5
I have configured my setup following Chapter 1 of the reference-manual carefully, up to the point where that reference-manual suggests using the hbm2ddl tool. I want to use it. I have tried for two days now to get something to work.
When I run this I get a warning that the process cannot find the hibernate.properties file ... and that it cannot find the hibernate.cfg.xml file (file not found) then, of course, the process fatals.
To make it easier to modify, run, modify, run ... I have created a shell script which i modify, write to disk, run. I am using linux. I have tried providing full path names for the properties file and cfg.xml and relative path names ... I have tried moving the file to current directory, etc. Nothing seems to work. I will appreciate any guidance to repair whatever stupidity I have committed. Thanks!
Following is the script:
java \
-cp code/suncertify/web/WEB-INF/lib/hibernate3.jar:\
code/suncertify/web/WEB-INF/lib/commons-logging-1.0.4.jar:\
code/suncertify/web/WEB-INF/lib/dom4j-1.6.jar:\
code/suncertify/web/WEB-INF/lib/commons-collections-2.1.1.jar\
org.hibernate.tool.hbm2ddl.SchemaExport \
--text \
--config=code/suncertify/web/WEB-INF/hibernate.cfg.xml \
--properties=hibernate.properties \
code/suncertify/client/ServiceProvider.hbm.xml
By the way, while working with this I have the pdf of the reference-manual up in another window, set to Chapter 21, the chapter on how to use this tool.
|