Monday, September 9, 2013

Flyway: No enum const class com.googlecode.flyway.core.api.MigrationState.SUCCESS

This exception thrown by Flyway:

java.lang.IllegalArgumentException: No enum const class com.googlecode.flyway.core.api.MigrationState.SUCCESS 
        at java.lang.Enum.valueOf(Enum.java:214)
        at com.googlecode.flyway.core.api.MigrationState.valueOf(MigrationState.java:21)
        at com.googlecode.flyway.core.metadatatable.MetaDataTable$MigrationInfoRowMapper.mapRow(MetaDataTable.java:382)
        at com.googlecode.flyway.core.metadatatable.MetaDataTable$MigrationInfoRowMapper.mapRow(MetaDataTable.java:370)
        at com.googlecode.flyway.core.util.jdbc.JdbcTemplate.query(JdbcTemplate.java:319)
...

happens because an invalid value in the column state. In my case it was failing because of an extra blank space I didn't notice.

No comments:

Post a Comment