New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with liquibase 3.6.0 update on latest release #2385

Closed
dev-marc-laurent opened this Issue Jun 11, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@dev-marc-laurent

dev-marc-laurent commented Jun 11, 2018

I've updated Dropwizard to the version 1.3.3, which upgrades Liquibase from 3.5.5 to 3.6.0, but when I try to run the db migrate command it's returning the following message:

INFO  [2018-06-11 14:06:14,959] liquibase.lockservice.StandardLockService: Successfully released change log lock
liquibase.exception.MigrationFailedException: Migration failed for change set database/db.changelog-1.1.xml::4::mauricio:
     Reason: java.lang.IllegalStateException: Cannot find generators for database class liquibase.database.core.MySQLDatabase, statement: liquibase.statement.core.CopyRowsStatement@1ba7db2a
	at liquibase.changelog.ChangeSet.execute(ChangeSet.java:637)
	at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53)
	at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:78)
	at liquibase.Liquibase.update(Liquibase.java:202)
	at liquibase.Liquibase.update(Liquibase.java:179)
	at liquibase.Liquibase.update(Liquibase.java:175)
	at liquibase.Liquibase.update(Liquibase.java:168)
	at io.dropwizard.migrations.DbMigrateCommand.run(DbMigrateCommand.java:68)
	at io.dropwizard.migrations.DbCommand.run(DbCommand.java:55)
	at io.dropwizard.migrations.AbstractLiquibaseCommand.run(AbstractLiquibaseCommand.java:68)
	at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:87)
	at io.dropwizard.cli.Cli.run(Cli.java:78)
	at io.dropwizard.Application.run(Application.java:93)
	at com.objectedge.middleware.MiddlewareApplication.main(MiddlewareApplication.java:145)
Caused by: java.lang.IllegalStateException: Cannot find generators for database class liquibase.database.core.MySQLDatabase, statement: liquibase.statement.core.CopyRowsStatement@1ba7db2a
	at liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:221)
	at liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:208)
	at liquibase.database.core.SQLiteDatabase.getAlterTableSqls(SQLiteDatabase.java:148)
	at liquibase.sqlgenerator.core.AddColumnGeneratorSQLite.generateSql(AddColumnGeneratorSQLite.java:80)
	at liquibase.sqlgenerator.core.AddColumnGeneratorSQLite.generateSql(AddColumnGeneratorSQLite.java:21)
	at liquibase.sqlgenerator.SqlGeneratorChain.generateSql(SqlGeneratorChain.java:30)
	at liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:223)
	at liquibase.executor.AbstractExecutor.applyVisitors(AbstractExecutor.java:25)
	at liquibase.executor.jvm.JdbcExecutor.access$500(JdbcExecutor.java:38)
	at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:338)
	at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:57)
	at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125)
	at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1229)
	at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1211)
	at liquibase.changelog.ChangeSet.execute(ChangeSet.java:600)
	... 13 more

I've found that the problem was in a addColumn statement, which under the hood liquibase is trying get the SqlGenerator for that statement, but is returning for the wrong one (liquibase.sqlgenerator.core.AddColumnGeneratorSQLite).

It seems this was already reported (here: https://liquibase.jira.com/browse/CORE-3200) and fixed in the version 3.6.1.

Can you please update the version of Liquibase dependency from 3.6.0 to 3.6.1?

Thanks in advance.

FredDeschenes added a commit to FredDeschenes/dropwizard that referenced this issue Jun 11, 2018

@joschi joschi closed this in #2386 Jun 14, 2018

joschi added a commit that referenced this issue Jun 14, 2018

joschi added a commit that referenced this issue Jun 14, 2018

Update liquibase to 3.6.1 (#2386)
Fixes #2385

(cherry picked from commit 4a9fada)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment