I am trying to integrate liquibase in our project, it works fine with MySQL. But for our project, it is forseen of DB type change in the future and one possibility is to use data warehouse instead of MySQL, which is not supported by liquibase yet.
I have tried to communicate with data warehouse (named Vertica) via JDBC commands, works fine. So I tried to use sql tag in liquibase change log to communicate with the DB, but failed with the following exceptions:
DEBUG 1/24/12 4:30 PM:liquibase: Unable to load/access Apache Derby driver class org.apache.derby.tools.sysinfo to check version: org.apache.derby.tools.sysinfo
WARNING 1/24/12 4:30 PM:liquibase: Unknown database: Vertica DatabaseLiquibase Update Failed: Unknown Reason SEVERE 1/24/12 4:30 PM:liquibase: Unknown Reason java.lang.NullPointerException at liquibase.database.AbstractDatabase.rollback(AbstractDatabase.java:981) at liquibase.integration.commandline.Main.doMigration(Main.java:835) at liquibase.integration.commandline.Main.main(Main.java:133)
I have already set the log level to DEBUG, but still didn’t get much info of the exception. Do you have some suggestion of what can I do to make it working? Thanks!
Assuming you are running 2.0.2, the line corresponds to having a null connection in the code that tries to do a rollback to clean up after normal processing. There may be an error earlier that is being masked by the rollback failure, but I would think that should show as well. Are there any other errors?
You can create your own Database instance that supports Vertica using the extension system (liquibase.org/extensions) to handle any issues you run into. Creating a VerticaDatabase class may solve this as well too.
I am currently trying to manage a Ingres-DB with liquibase and I run into the same problem. Seeing that there is an interrupt in communication in this thread, I just picking it :-).
I implemented a minimalistic class liquibase.database.ext.IngresDatabase and put it on the classpath:
DEBUG 2/23/12 12:20 PM:liquibase: Unable to load/access Apache Derby driver class org.apache.derby.tools.sysinfo to check version: org.apache.derby.tools.sysinfo WARNING 2/23/12 12:20 PM:liquibase: Unknown database: INGRES Liquibase Update Failed: Unknown Reason SEVERE 2/23/12 12:20 PM:liquibase: Unknown Reason java.lang.NullPointerException at liquibase.database.AbstractDatabase.rollback(AbstractDatabase.java:981) at liquibase.integration.commandline.Main.doMigration(Main.java:835) at liquibase.integration.commandline.Main.main(Main.java:133)
Why is derby involved at all? - I don’t see a reference.
It seems that the class (located in bin/liquibase/database/ext) is not loaded. At least, I get the same error message when I execute the same without ./bin on the classpath.
After checking out the source I found the problem for NullpointerException:
The connection is not passed to the database object in the DatabaseFactory in case of unsupported databases. This will always result in a NullPointerException. Attached the modified source.