Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 1169

Cannot get diff against Hibernate to work in ant

$
0
0
I am using these jars:
hibernate-core-4.2.7.SP1-redhat-3.jar
liquibase.jar (3.4.2)
liquibase-hibernate4.2-3.5.jar
liquibase-oracle-3.0.0.jar

As well as the other required jars of course.

My database:
    <liquibase:database id="my-database"
        driver="${liquibase.database.driver}"
        url="${liquibase.database.url}"
        user="${liquibase.database.username}"
        password="${liquibase.database.password}" >
    </liquibase:database>

liquibase.properties:
liquibase.database.username=emr
liquibase.database.password=xxxx
liquibase.database.driver=oracle.jdbc.driver.OracleDriver
liquibase.database.url=jdbc:oracle:thin:@(xxxx)
liquibase.persistence.unit=hibernate:ejb3:emrEJB?dialect=org.hibernate.dialect.OracleDialect

My ant diff target:
    <target name="diff-against-hibernate">
        <liquibase:diffDatabaseToChangeLog
                databaseref="my-database"
                classpathref="mypath.classpath"
                diffTypes="tables,columns,views">
            <referencedatabase url="${liquibase.persistence.unit}"/>
            <txt outputfile="${change_control}/dbupdate/hibernate/${liquibase.hibernate.changelog.file}"/>
        </liquibase:diffDatabaseToChangeLog>
    </target>

I've tried a lot of different variations of the ant target and even tried the latest snapshot jar of liquibase.  But every time I run I get the same error:
BUILD FAILED
C:\Production\jboss_emr_eap\g2\dbautomation.xml:111: JDBC driver is required.

Does the hibernate extension actually work with the latest liquibase jar?  I swear I had this working in a previous version of liquibase but I seem to have misplaced that code.

If I run ant with the debug flag I get the full stack trace.  (BTW I'm running ant inside eclipse):

    at liquibase.integration.ant.type.DatabaseType.validateParameters(DatabaseType.java:133)
    at liquibase.integration.ant.type.DatabaseType.createDatabase(DatabaseType.java:51)
    at liquibase.integration.ant.BaseLiquibaseTask.createDatabaseFromType(BaseLiquibaseTask.java:100)
    at liquibase.integration.ant.AbstractDatabaseDiffTask.getDiffResult(AbstractDatabaseDiffTask.java:24)
    at liquibase.integration.ant.DiffDatabaseToChangeLogTask.executeWithLiquibaseClassloader(DiffDatabaseToChangeLogTask.java:44)
    at liquibase.integration.ant.BaseLiquibaseTask.execute(BaseLiquibaseTask.java:81)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:392)
    at org.apache.tools.ant.Target.performTasks(Target.java:413)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
    at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)


Viewing all articles
Browse latest Browse all 1169

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>