Hibernate and Liquibase 3.x

I’m hoping to get hibernate support back going again for 3.0, but I’ve been focusing on some bigfixes for the core 3.0 release so far.



I was planning to use Liquibase-hibernate with the latest Liquibase version and Hibernate 4. The current version of Liquibase-hibernate works only with Liquibase 2.x so I have checked out the code and have been trying to upgrade Liquibase-hibernate hoping I would be able to contribute some code.

It looks like Liquibase 3.x API is  completely tied to JDBC and there is no way to plug anything else like Hibernate because of snapshot generators structure.

Is there any plan to support Hibernate in Liquibase 3 ?

Yes, it is a separate extension available from https://github.com/liquibase/liquibase-hibernate/wiki


Does hibernate work now?

So it looks like the persistence.xml being read isn’t having the variables expanded. How are you normally bootstrapping the persistence.xml so that they get replaced?

You may need to look at using the liquibase/ext/hibernate/customfactory/CustomEjb3ConfigurationFactory style to read and configure the persitence.xml before passing it to liquibase.


Thanks for providing the new Hibernate-support.


A question about the new JPA-support in the Hibernate-integration for Liquibase.
Our persistence.xml files uses system variables to define what Hibernate dialect to use:

<property name=“hibernate.dialect”


I have tried to set the condico.database parameter in various ways, but I’m unable to get anything else than:

C:\Clearing\xclearing\java\Liquibase\base\build.xml:140: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: java.lang.ClassNotFoundException: com.omx.condico.server.persistence.dialect.${condico.database:Oracle}Dialect
Is it possible to use the integration with variables in the persistence.xml file?