Thanks a lot! The dependencies seem to be solved. Classpath now looks like this:
--classpath="hibernate3.jar:slf4j-api-1.6.1.jar:dom4j-1.6.1.jar:liquibase-hibernate-2.0.0.jar:mysql-connector-java-5.1.21-bin.jar" \ Unfortunately the hibernate mapping file cannot be found. Tried both, absolute and relative paths.
org.hibernate.HibernateException: config.hbm.xml not found
Hi all,
is anybody successfully using the hibernate diff feature? I tried it via command line but had no success. I read all the related posts in the forum but still get the “java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration” error.
Any suggestion appreciated …
Thanks in advance …
Guest
August 6, 2012, 6:42pm
3
Looks like you’re using the ‘:’ as separator instead of the ‘;’.
Try to add the direrctory (with config.hbm.xml) to classpath.
You should add the hibernate library to classpath.
For example:
java -jar liquibase.jar ^
--classpath="./hibernate.jar;./liquibase-hibernate-2.0.0.jar" ^
--changeLogFile=changelog.xml ^
--url=“jdbc:hsqldb:file:D:/Projects/temp/data/Base;shutdown=true” ^
--driver=org.hsqldb.jdbcDriver ^
--username=u ^
--password=p ^
diffChangeLog ^
--referenceUrl=“hibernate:hibernate.cfg.xml”
Thanks for your reply. My config looks like this:
./liquibase \
--logLevel=debug \
--classpath="hibernate3.jar:liquibase-hibernate-2.0.0.jar:mysql-connector-java-5.1.21-bin.jar" \
--changeLogFile=changelog.xml \
--url=jdbc:mysql://localhost/dbname \
--driver=com.mysql.jdbc.Driver \
--username=username \
--password=pwd \
diffChangeLog \
--referenceUrl=hibernate:config.hbm.xml \
If I change the name of one of the jars in the classpath I get a "... does not exist", so I guess they are correctly found. But if the names are correct I get the "<span.
“;” is not working for me. And they use “:” in the documentation ( http://www.liquibase.org/manual/hibernate ).