Hi,
I note that this is using “liquibase-1.9.5.tar.gz”
I hacked at the following:
cat ./samples/commandline/liquibase.properties classpath: /my/path/to/mysql-connector-java-5.0.4-bin.jar changeLogFile=samples/changelogs/mysql/complete/included.changelog.xml username=liquibase password=liquibase url=jdbc:mysql://localhost/liquibase driver=com.mysql.jdbc.Driver logLevel=SEVERE
This file is verbatim from the examples, but included here for completeness:
$ cat samples/changelogs/mysql/complete/included.changelog.xml <?xml version="1.0" encoding="UTF-8"?> http://www.liquibase.org/xml/ns/dbchangelog/1.7" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.7 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.7.xsd"> Liquibase 0.8 Released
Starting from a fresh database:
mysql> create database liquibase; Query OK, 1 row affected (0.00 sec) mysql> grant all on liquibase.* to 'liquibase'@'localhost' identified by 'liquibase'; Query OK, 0 rows affected (0.00 sec)
Some trivial things throw errors:
./liquibase --defaultsFile=./samples/commandline/liquibase.properties diff Migration Failed: Unknown Reason. For more information, use the --logLevel flag) 20-Apr-2010 04:46:18 liquibase.commandline.Main main SEVERE: Unknown Reason java.lang.NullPointerException at liquibase.database.OracleDatabase.getDefaultDriver(OracleDatabase.java:100) at liquibase.database.DatabaseFactory.findDefaultDriver(DatabaseFactory.java:93) at liquibase.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:45) at liquibase.commandline.Main.createDatabaseFromCommandParams(Main.java:755) at liquibase.commandline.Main.doMigration(Main.java:585) at liquibase.commandline.Main.main(Main.java:97)
Where’s it getting oracle from? Am I missing some libraries? Why should this matter?
When I do an “update” that’s okay, but when I try to roll back:
$ ./liquibase --defaultsFile=./samples/commandline/liquibase.properties rollback Migration Failed: Unknown Reason. For more information, use the --logLevel flag) 20-Apr-2010 04:48:51 liquibase.commandline.Main main SEVERE: Unknown Reason java.util.NoSuchElementException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:813) at java.util.HashMap$KeyIterator.next(HashMap.java:845) at liquibase.commandline.Main.doMigration(Main.java:669) at liquibase.commandline.Main.main(Main.java:97) $ ./liquibase --defaultsFile=./samples/commandline/liquibase.properties rollback 1 Migration Failed: Could not find tag '1' in the database. For more information, use the --logLevel flag) 20-Apr-2010 04:48:53 liquibase.commandline.Main main SEVERE: Could not find tag '1' in the database liquibase.exception.RollbackFailedException: Could not find tag '1' in the database at liquibase.parser.filter.AfterTagChangeSetFilter.(AfterTagChangeSetFilter.java:28) at liquibase.Liquibase.rollback(Liquibase.java:268) at liquibase.commandline.Main.doMigration(Main.java:669) at liquibase.commandline.Main.main(Main.java:97)
If someone could please suggest what these errors mean that’d be great.
Cheers,
Patrick