I'm using the Spring Liquibase integration quite successfully and have relied on it to handle the database on many an application release, however this time when I deployed my app I got the following exceptions:
Aug 24 11:39:48 server-01 ... Invocation of init method failed; nested exception is liquibase.exception.DatabaseException: java.util.NoSuchElementException...
Aug 24 11:39:48 server-01 Caused by: liquibase.exception.DatabaseException: java.util.NoSuchElementException
Aug 24 11:39:48 server-01 at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.getTable(JdbcDatabaseSnapshotGenerator.java:110) ~[liquibase-core-2.0.1.jar:na]
Aug 24 11:39:48 server-01 at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.getDatabaseChangeLogTable(JdbcDatabaseSnapshotGenerator.java:37) ~[liquibase-core-2.0.1.jar:na]
Aug 24 11:39:48 server-01 at liquibase.database.AbstractDatabase.checkDatabaseChangeLogTable(AbstractDatabase.java:357) ~[liquibase-core-2.0.1.jar:na]
Aug 24 11:39:48 server-01 at liquibase.Liquibase.checkDatabaseChangeLogTable(Liquibase.java:535) ~[liquibase-core-2.0.1.jar:na]
Aug 24 11:39:48 server-01 at liquibase.Liquibase.forceReleaseLocks(Liquibase.java:573) ~[liquibase-core-2.0.1.jar:na]
Aug 24 11:39:48 server-01 at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:236) ~[liquibase-core-2.0.1.jar:na]
...
Aug 24 11:39:48 server-01 Caused by: java.util.NoSuchElementException: null
Aug 24 11:39:48 server-01 at java.util.TreeMap.key(TreeMap.java:1206) ~[na:1.6.0_22]
Aug 24 11:39:48 server-01 at java.util.TreeMap.lastKey(TreeMap.java:274) ~[na:1.6.0_22]
Aug 24 11:39:48 server-01 at java.util.TreeSet.last(TreeSet.java:384) ~[na:1.6.0_22]
Aug 24 11:39:48 server-01 at liquibase.database.typeconversion.TypeConverterFactory.findTypeConverter(TypeConverterFactory.java:77) ~[liquibase-core-2.0.1.jar:na]
Aug 24 11:39:48 server-01 at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.getColumnTypeAndDefValue(JdbcDatabaseSnapshotGenerator.java:400) ~[liquibase-core-2.0.1.jar:na]
Aug 24 11:39:48 server-01 at liquibase.snapshot.jvm.MySQLDatabaseSnapshotGenerator.getColumnTypeAndDefValue(MySQLDatabaseSnapshotGenerator.java:108) ~[liquibase-core-2.0.1.jar:na]
Aug 24 11:39:48 server-01 at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.readColumn(JdbcDatabaseSnapshotGenerator.java:202) ~[liquibase-core-2.0.1.jar:na]
Aug 24 11:39:48 server-01 at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.getTable(JdbcDatabaseSnapshotGenerator.java:102) ~[liquibase-core-2.0.1.jar:na]
Aug 24 11:39:48 server-01 ... 98 common frames omitted
After restarting the app Liquibase executed as expected and I haven't been able to reproduce it since.
I wouldn't have thought this is a factor but we did recently upgraded our DB to MySQL 5.5, however Liquibase has been running successfully against it before this incident.
I would be grateful if anybody could shed any light on why this may have occurred.