question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting NoSuchMethodError: ... 'hibernate.id.enhanced.SequenceStyleGenerator.generatorKey()'

See original GitHub issue

Environment

Liquibase Version: 4.7.1 Liquibase Integration & Version: <Pick one: CLI, maven, gradle, spring boot, servlet, etc.> liquibase.gradle 2.0.4 spring boot 2.6.2 hibernate 5.6.3

Database Vendor & Version: PostgreSQL Operating System Type & Version: Mac

Description

When I run diffChangelog gradle task I am getting this output error:

[2022-02-02 16:38:26] SEVERE [liquibase.integration] Unexpected error running Liquibase: 'java.lang.Object org.hibernate.id.enhanced.SequenceStyleGenerator.generatorKey()'
java.lang.NoSuchMethodError: 'java.lang.Object org.hibernate.id.enhanced.SequenceStyleGenerator.generatorKey()'
	at liquibase.ext.hibernate.snapshot.SequenceSnapshotGenerator.addTo(SequenceSnapshotGenerator.java:63)
	at liquibase.ext.hibernate.snapshot.HibernateSnapshotGenerator.snapshot(HibernateSnapshotGenerator.java:82)
	at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
	at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:312)
	at liquibase.snapshot.DatabaseSnapshot.init(DatabaseSnapshot.java:105)
	at liquibase.snapshot.DatabaseSnapshot.<init>(DatabaseSnapshot.java:58)
	at liquibase.snapshot.JdbcDatabaseSnapshot.<init>(JdbcDatabaseSnapshot.java:34)
	at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:215)
	at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:188)
	at liquibase.command.core.InternalDiffCommandStep.createReferenceSnapshot(InternalDiffCommandStep.java:188)
	at liquibase.command.core.InternalDiffCommandStep.createDiffResult(InternalDiffCommandStep.java:98)
	at liquibase.command.core.InternalDiffChangelogCommandStep.run(InternalDiffChangelogCommandStep.java:49)
	at liquibase.command.CommandScope.execute(CommandScope.java:157)
	at liquibase.integration.commandline.CommandLineUtils.doDiffToChangeLog(CommandLineUtils.java:218)
	at liquibase.integration.commandline.Main.doMigration(Main.java:1601)
	at liquibase.integration.commandline.Main$1.lambda$run$0(Main.java:398)
	at liquibase.Scope.lambda$child$0(Scope.java:180)
	at liquibase.Scope.child(Scope.java:189)
	at liquibase.Scope.child(Scope.java:179)
	at liquibase.Scope.child(Scope.java:158)
	at liquibase.integration.commandline.Main$1.run(Main.java:397)
	at liquibase.integration.commandline.Main$1.run(Main.java:221)
	at liquibase.Scope.child(Scope.java:189)
	at liquibase.Scope.child(Scope.java:165)
	at liquibase.integration.commandline.Main.run(Main.java:221)
	at liquibase.integration.commandline.Main.main(Main.java:164)

Additional Context

It seems like there is an incompatibility between hibernate 5.6.3 and liquibase 4.7.1. There is also this question on stack owerflow: https://stackoverflow.com/questions/70628527/liquibase-hibernate-missing-sequencestylegenerator-generatorkey-error

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
yrodierecommented, Feb 4, 2022

Thanks.

Tracking the problem on the Hibernate ORM side as https://hibernate.atlassian.net/browse/HHH-15069

0reactions
JanCizmarcommented, Apr 6, 2022

Hey! I solved it by downgrading Spring to 2.5.10, so I don’t know. But I guess it’s fixed. 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Liquibase Hibernate missing SequenceStyleGenerator ...
Object org.hibernate.id.enhanced.SequenceStyleGenerator.generatorKey()' java.lang.NoSuchMethodError: 'java.lang.
Read more >
SequenceStyleGenerator (Hibernate JavaDocs)
Generates identifier values based on an sequence-style database structure. Variations range from actually using a sequence to using a table to mimic a ......
Read more >
NoSuchMethodError in Java - Baeldung
As the name suggests, the NoSuchMethodError occurs when a particular method is not found. This method can either be an instance method or...
Read more >
org.hibernate.id.enhanced.SequenceStyleGenerator ...
Determine the name of the sequence (or table if this resolves to a physical table) to use. Called du. getDatabaseStructure.
Read more >
How To Fix java.lang.NoSuchMethodError:org ... - YouTube
In this video, I will tell how to fix java.lang. NoSuchMethodError : org.testng.TestRunner.addListener(Ljava/lang/Object;)V issue.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found