It appears that the Hibernate integration is somewhat faulty. The documentation at http://www.liquibase.org/manual/hibernate is still not quite right (it references baseUrl in one of the examples).
But that’s not my real problem. Here’s the ant build.xml file I’m attempting to run:
<?xml version="1.0" ?>
<diffDatabaseToChangeLog
driver=“org.postgresql.Driver”
url=“jdbc:postgresql:chelsea”
username=“chelsea”
password=“chelsea”
referenceUrl=“hibernate:/Users/maass/workspace/ChelseaSpike2/src/hibnernate.cfg.xml”
referenceDriver=“org.postgresql.Driver”
outputFile=“changelog.xml”
classpathref=“classpath”/>
It is currently generating:
Buildfile: C:\Users\maass\workspace\ChelseaSpike2\ant\build.xml
genLiquibase:
BUILD FAILED
C:\Users\maass\workspace\ChelseaSpike2\ant\build.xml:27: liquibase.exception.Dat
abaseException: Connection could not be created to hibernate:/Users/maass/worksp
ace/ChelseaSpike2/src/hibnernate.cfg.xml with driver org.postgresql.Driver. Pos
sibly the wrong driver for the given database URL
at liquibase.integration.ant.BaseLiquibaseTask.createDatabaseObject(Base
LiquibaseTask.java:241)
at liquibase.integration.ant.DiffDatabaseTask.execute(DiffDatabaseTask.j
ava:98)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
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(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Total time: 22 seconds
Which makes a certain amount of sense, as I haven’t specified a driver for the Hibernate side of the diff.
What’s wrong?