hibernate/hibernate-orm · critical · UnsupportedOperationException
The {storageEngine} storage engine is not supported
Error message
The {storageEngine} storage engine is not supported What it means
MySQLLegacyDialect.determineStorageEngine() resolves the storage engine from the 'hibernate.dialect.storage_engine' setting. Only the values 'innodb' and 'myisam' (case-insensitive) are recognized; any other value falls through to UnsupportedOperationException('The <value> storage engine is not supported'). The check runs while the dialect determines column types/DDL, so it typically aborts SessionFactory bootstrap.
Source
Thrown at hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/MySQLLegacyDialect.java:236
getDefaultProperties().setProperty( Environment.MAX_FETCH_DEPTH, "2" );
}
private MySQLStorageEngine createStorageEngine() {
String storageEngine = Environment.getProperties().getProperty( Environment.STORAGE_ENGINE );
if (storageEngine == null) {
storageEngine = System.getProperty( Environment.STORAGE_ENGINE );
}
if (storageEngine == null) {
return getDefaultMySQLStorageEngine();
}
else if( "innodb".equalsIgnoreCase( storageEngine ) ) {
return InnoDBStorageEngine.INSTANCE;
}
else if( "myisam".equalsIgnoreCase( storageEngine ) ) {
return MyISAMStorageEngine.INSTANCE;
}
else {
throw new UnsupportedOperationException( "The " + storageEngine + " storage engine is not supported" );
}
}
@Override
protected String columnType(int sqlTypeCode) {
switch ( sqlTypeCode ) {
case BOOLEAN:
// HHH-6935: Don't use "boolean" i.e. tinyint(1) due to JDBC ResultSetMetaData
return "bit";
case TIMESTAMP:
return getMySQLVersion().isBefore( 5, 7 )
? "datetime" : "datetime($p)";
case TIMESTAMP_WITH_TIMEZONE:
return getMySQLVersion().isBefore( 5, 7 )
? "timestamp" : "timestamp($p)";
case NUMERIC:
// it's just a synonymView on GitHub (pinned to fad1729dce)
Solutions
- Set the property to innodb or myisam (exact values, matched case-insensitively) — innodb is the right choice when you need transactions/foreign keys
- Remove the hibernate.dialect.storage_engine property entirely so the dialect default (getDefaultMySQLStorageEngine()) applies
- Migrate off MySQLLegacyDialect to the current org.hibernate.dialect.MySQLDialect and drop the legacy-specific property
Example fix
# before (persistence.xml) <property name="hibernate.dialect.storage_engine" value="rocksdb"/> # after <property name="hibernate.dialect.storage_engine" value="innodb"/> <!-- or omit the property to use the dialect default -->
Defensive patterns
Strategy: validation
Validate before calling
// validate before building the SessionFactory
String engine = configuration.getProperty("hibernate.dialect.storage_engine");
if ( engine != null
&& !"innodb".equalsIgnoreCase(engine.trim())
&& !"myisam".equalsIgnoreCase(engine.trim()) ) {
throw new IllegalStateException(
"hibernate.dialect.storage_engine must be 'innodb' or 'myisam', got: " + engine);
} Prevention
- Treat hibernate.dialect.storage_engine as an enum: only innodb/myisam on the legacy dialect
- Add a configuration validation step to bootstrap so bad values fail with a clear message before Hibernate throws
- Prefer omitting the property and relying on the dialect default (InnoDB on modern MySQL) unless you specifically need MyISAM
- Migrate from MySQLLegacyDialect to the current MySQLDialect when the server version allows
When it happens
Trigger: Setting the configuration property hibernate.dialect.storage_engine (Environment.STORAGE_ENGINE) to anything other than innodb or myisam while using MySQLLegacyDialect — e.g. 'rocksdb', 'memory', a trailing-whitespace or misspelled value like 'InnoDB ' handled strictly, or a placeholder copied from another project.
Common situations: Copying persistence.xml/application.yml between projects with different engines; setting the property for a newer MySQLDialect profile (which expects different handling) and then running tests on the legacy dialect; CI config injecting an env-based engine value that is empty or misspelled.
Related errors
- Could not instantiate event listener '{}'
- Unable to instantiate StatementObserver - {}
- No ServiceRegistry was passed to Configuration#buildSessionF
- illegal value for configuration setting 'hibernate.connectio
- Could not instantiate named dialect class [%s]
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/c8f0f55b591086bd.
Report an issue: GitHub.