java.lang.NoSuchMethodError with liquibase 3.5
See original GitHub issueWhen using the latest version with liquibase 3.5 I get java.lang.NoSuchMethodError: liquibase.structure.core.ForeignKey.addForeignKeyColumn
. This doesn’t occur with liquibase 3.4.2.
It’s weird because in https://github.com/liquibase/liquibase/blob/master/liquibase-core/src/main/java/liquibase/structure/core/ForeignKey.java the method exists with the same signature
public ForeignKey addForeignKeyColumn(Column foreignKeyColumn) {
if (foreignKeyColumn.getAttribute("relation", Object.class) == null) {
foreignKeyColumn.setRelation(getForeignKeyTable());
}
getAttribute("foreignKeyColumns", List.class).add(foreignKeyColumn);
return this;
}
This is the stacktrace
Unexpected error running Liquibase: liquibase.structure.core.ForeignKey.addForeignKeyColumn(Lliquibase/structure/core/Column;)V
SEVERE 30/04/16 9:44 PM: liquibase: liquibase.structure.core.ForeignKey.addForeignKeyColumn(Lliquibase/structure/core/Column;)V
java.lang.NoSuchMethodError: liquibase.structure.core.ForeignKey.addForeignKeyColumn(Lliquibase/structure/core/Column;)V
at liquibase.ext.hibernate.snapshot.ForeignKeySnapshotGenerator.addTo(ForeignKeySnapshotGenerator.java:54)
at liquibase.ext.hibernate.snapshot.HibernateSnapshotGenerator.snapshot(HibernateSnapshotGenerator.java:80)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:50)
at liquibase.ext.hibernate.snapshot.HibernateSnapshotGenerator.snapshot(HibernateSnapshotGenerator.java:72)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:50)
at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:244)
at liquibase.snapshot.DatabaseSnapshot.replaceObject(DatabaseSnapshot.java:349)
at liquibase.snapshot.DatabaseSnapshot.replaceObject(DatabaseSnapshot.java:371)
at liquibase.snapshot.DatabaseSnapshot.includeNestedObjects(DatabaseSnapshot.java:291)
at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:265)
at liquibase.snapshot.DatabaseSnapshot.init(DatabaseSnapshot.java:78)
at liquibase.snapshot.DatabaseSnapshot.<init>(DatabaseSnapshot.java:51)
at liquibase.snapshot.JdbcDatabaseSnapshot.<init>(JdbcDatabaseSnapshot.java:28)
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:150)
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:139)
at liquibase.command.DiffCommand.createReferenceSnapshot(DiffCommand.java:219)
at liquibase.command.DiffCommand.createDiffResult(DiffCommand.java:141)
at liquibase.command.DiffToChangeLogCommand.run(DiffToChangeLogCommand.java:51)
at liquibase.command.AbstractCommand.execute(AbstractCommand.java:8)
at liquibase.integration.commandline.CommandLineUtils.doDiffToChangeLog(CommandLineUtils.java:231)
at liquibase.integration.commandline.Main.doMigration(Main.java:992)
at liquibase.integration.commandline.Main.run(Main.java:184)
at liquibase.integration.commandline.Main.main(Main.java:103)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Liquibase NoSuchMethodError with SQL Server
When running my Liquibase setup I'm getting the following error: Caused by: java.lang.NoSuchMethodError: liquibase.database.Database.
Read more >Liquibase 3.0.2 Maven Plugin failing -- NoSuchMethodError
I am trying to upgrade from Liquibase 2.0.1 to version 3.0.2, but have run into a build failure. The root exception is a...
Read more >com.fasterxml.jackson.databind.introspect.AnnotatedMember ...
NoSuchMethodError: com.fasterxml.jac... Caused by: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.introspect.AnnotatedMember.
Read more >Percona Online Schema Change - Liquibase Extensions
UnexpectedLiquibaseException: 2java.lang.NoSuchMethodError: liquibase.ext.percona.PerconaDropColumnChange.getColumns()Ljava/util/List;.
Read more >Index (liquibase 4.18.0 API) - javadoc.io
AbstractChange() - Constructor for class liquibase.change. ... RowMapper implementation that creates a java.util.Map for each row, representing all columns ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hopefully soon. I have one last url pattern to get working and then some testing. Taking longer than I hoped, but also working on the Liquibase 3.5.2 release concurrently.
The liquibase-hibernate 3.6 release will support Liquibase 3.5 and fix this issue. Planning to release both next week.