{"record":{"id":"c8f0f55b591086bd","repo":"hibernate/hibernate-orm","slug":"the-storageengine-storage-engine-is-not-supporte","errorCode":null,"errorMessage":"The {storageEngine} storage engine is not supported","messagePattern":"The (.+?) storage engine is not supported","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"critical","filePath":"hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/MySQLLegacyDialect.java","lineNumber":236,"sourceCode":"\t\tgetDefaultProperties().setProperty( Environment.MAX_FETCH_DEPTH, \"2\" );\n\t}\n\n\tprivate MySQLStorageEngine createStorageEngine() {\n\t\tString storageEngine = Environment.getProperties().getProperty( Environment.STORAGE_ENGINE );\n\t\tif (storageEngine == null) {\n\t\t\tstorageEngine = System.getProperty( Environment.STORAGE_ENGINE );\n\t\t}\n\t\tif (storageEngine == null) {\n\t\t\treturn getDefaultMySQLStorageEngine();\n\t\t}\n\t\telse if( \"innodb\".equalsIgnoreCase( storageEngine ) ) {\n\t\t\treturn InnoDBStorageEngine.INSTANCE;\n\t\t}\n\t\telse if( \"myisam\".equalsIgnoreCase( storageEngine ) ) {\n\t\t\treturn MyISAMStorageEngine.INSTANCE;\n\t\t}\n\t\telse {\n\t\t\tthrow new UnsupportedOperationException( \"The \" + storageEngine + \" storage engine is not supported\" );\n\t\t}\n\t}\n\n\t@Override\n\tprotected String columnType(int sqlTypeCode) {\n\t\tswitch ( sqlTypeCode ) {\n\t\t\tcase BOOLEAN:\n\t\t\t\t// HHH-6935: Don't use \"boolean\" i.e. tinyint(1) due to JDBC ResultSetMetaData\n\t\t\t\treturn \"bit\";\n\n\t\t\tcase TIMESTAMP:\n\t\t\t\treturn getMySQLVersion().isBefore( 5, 7 )\n\t\t\t\t\t\t? \"datetime\" : \"datetime($p)\";\n\t\t\tcase TIMESTAMP_WITH_TIMEZONE:\n\t\t\t\treturn getMySQLVersion().isBefore( 5, 7 )\n\t\t\t\t\t\t? \"timestamp\" : \"timestamp($p)\";\n\t\t\tcase NUMERIC:\n\t\t\t\t// it's just a synonym","sourceCodeStart":218,"sourceCodeEnd":254,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/MySQLLegacyDialect.java#L218-L254","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"# before (persistence.xml)\n<property name=\"hibernate.dialect.storage_engine\" value=\"rocksdb\"/>\n\n# after\n<property name=\"hibernate.dialect.storage_engine\" value=\"innodb\"/>\n<!-- or omit the property to use the dialect default -->","handlingStrategy":"validation","validationCode":"// validate before building the SessionFactory\nString engine = configuration.getProperty(\"hibernate.dialect.storage_engine\");\nif ( engine != null\n        && !\"innodb\".equalsIgnoreCase(engine.trim())\n        && !\"myisam\".equalsIgnoreCase(engine.trim()) ) {\n    throw new IllegalStateException(\n        \"hibernate.dialect.storage_engine must be 'innodb' or 'myisam', got: \" + engine);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["hibernate","mysql","configuration","storage-engine","bootstrap"],"backgroundTag":"invalid-hibernate-config-value","analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}