{"record":{"id":"c3377d0f468b9c21","repo":"hibernate/hibernate-orm","slug":"unable-to-parse-org-hibernate-flushmode","errorCode":null,"errorMessage":"Unable to parse org.hibernate.flushMode: {}","messagePattern":"Unable to parse org\\.hibernate\\.flushMode: (.+?)","errorType":"exception","errorClass":"PersistenceException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/jpa/internal/util/ConfigurationHelper.java","lineNumber":62,"sourceCode":"\t\t}\n\t\telse {\n\t\t\treturn FlushModeTypeHelper.interpretQueryFlushMode( value.toString() );\n\t\t}\n\t}\n\n\tpublic static FlushMode getFlushMode(Object value, FlushMode defaultFlushMode) {\n\t\tif ( value instanceof FlushMode mode ) {\n\t\t\treturn mode;\n\t\t}\n\t\telse if ( value instanceof jakarta.persistence.FlushModeType flushModeType ) {\n\t\t\treturn getFlushMode( flushModeType );\n\t\t}\n\t\telse if ( value instanceof String string ) {\n\t\t\treturn getFlushMode( string );\n\t\t}\n\t\telse {\n\t\t\tif ( defaultFlushMode == null ) {\n\t\t\t\tthrow new PersistenceException( \"Unable to parse org.hibernate.flushMode: \" + value );\n\t\t\t}\n\t\t\treturn defaultFlushMode;\n\t\t}\n\t}\n\n\tpublic static FlushMode getFlushMode(Object value) {\n\t\treturn getFlushMode( value, null );\n\t}\n\n\tprivate static FlushMode getFlushMode(String flushMode)  {\n\t\treturn flushMode == null ? null : FlushMode.valueOf( flushMode.toUpperCase(Locale.ROOT) );\n\t}\n\n\tprivate static FlushMode getFlushMode(FlushModeType flushMode)  {\n\t\treturn switch ( flushMode ) {\n\t\t\tcase AUTO -> FlushMode.AUTO;\n\t\t\tcase COMMIT -> FlushMode.COMMIT;\n\t\t\tcase EXPLICIT ->  FlushMode.MANUAL;","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/jpa/internal/util/ConfigurationHelper.java#L44-L80","documentation":"Error \"Unable to parse org.hibernate.flushMode: {}\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown at hibernate-core/src/main/java/org/hibernate/jpa/internal/util/ConfigurationHelper.java:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set org.hibernate.flushMode to a valid FlushMode value (AUTO, COMMIT, ALWAYS, MANUAL) as string; fix typos in configuration."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}