hibernate/hibernate-orm · error · HibernateException
Multiple generators using the database sequence '%s' are def
Error message
Multiple generators using the database sequence '%s' are defined, with conflicting 'initialValue' specifications: %s, %s
What it means
Error "Multiple generators using the database sequence '%s' are defined, with conflicting 'initialValue' specifications: %s, %s" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/boot/model/relational/Sequence.java:94
public String getContributor() {
return contributor;
}
public int getInitialValue() {
return initialValue;
}
public int getIncrementSize() {
return incrementSize;
}
public String getOptions() {
return options;
}
public void validate(int initialValue, int incrementSize) {
if ( this.initialValue != initialValue ) {
throw new HibernateException(
String.format(
"Multiple generators using the database sequence '%s' are defined, with conflicting 'initialValue' specifications: %s, %s",
exportIdentifier,
this.initialValue,
initialValue
)
);
}
if ( this.incrementSize != incrementSize ) {
throw new HibernateException(
String.format(
"Multiple generators using the database sequence '%s' are defined, with conflicting 'allocationSize' specifications: %s, %s",
exportIdentifier,
this.incrementSize,
incrementSize
)
);
}View on GitHub (pinned to fad1729dce)
Solutions
- Use the same initialValue in every @SequenceGenerator/@GenericGenerator that shares this database sequence.
Example fix
Use the same initialValue in every @SequenceGenerator/@GenericGenerator that shares this database sequence.
When it happens
Trigger: An entity mapping annotation or bootstrap configuration violates a Hibernate mapping rule.
Common situations: Annotation mapping mistakes: inverse-side @Id associations, @Column on @OneToOne, unmapped association targets, mismatched @EnumeratedValue/@Temporal usage, duplicate sequence generators.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/601500c907f2b632.
Report an issue: GitHub.