hibernate/hibernate-orm · error · IllegalArgumentException
Major version can not be null
Error message
Major version can not be null
What it means
Error "Major version can not be null" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/dialect/SimpleDatabaseVersion.java:53
}
else {
micro = version.getDatabaseMicroVersion();
}
}
public SimpleDatabaseVersion(int major, int minor) {
this( major, minor, 0 );
}
public SimpleDatabaseVersion(int major, int minor, int micro) {
this.major = major;
this.minor = minor;
this.micro = micro;
}
public SimpleDatabaseVersion(Integer major, Integer minor) {
if ( major == null ) {
throw new IllegalArgumentException( "Major version can not be null" );
}
this.major = major;
this.minor = minor == null ? NO_VERSION : minor;
this.micro = 0;
}
@Override
public int getDatabaseMajorVersion() {
return major;
}
@Override
public int getDatabaseMinorVersion() {
return minor;
}
@OverrideView on GitHub (pinned to fad1729dce)
Solutions
- Ensure JDBC metadata returns a major version.
- Pass an explicit version when constructing the dialect.
When it happens
Trigger: Triggered when the application calls a Hibernate dialect feature that the configured database dialect cannot provide: Major version can not be null.
Common situations: Common when running against a database whose dialect lacks this capability, when a mapping or HQL/Criteria query requests unsupported functionality, or when the wrong dialect is configured for the database in use. Error: Major version can not be null.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/8b9d7aa96e71f39d.
Report an issue: GitHub.