{"record":{"id":"21628486a50fcf97","repo":"flowable/flowable-engine","slug":"wrong-database-version","errorCode":null,"errorMessage":"Wrong database version","messagePattern":"Wrong database version","errorType":"console","errorClass":"FlowableWrongDbException","httpStatus":null,"severity":"critical","filePath":"modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/db/IdmDbSchemaManager.java","lineNumber":75,"sourceCode":"   @Override\n   protected boolean isUpdateNeeded() {\n       boolean propertyTablePresent = isTablePresent(IDM_PROPERTY_TABLE);\n       if (!propertyTablePresent) {\n           return isIdmGroupTablePresent();\n       }\n       return true;\n   }\n   \n   public boolean isIdmGroupTablePresent() {\n       return isTablePresent(\"ACT_ID_GROUP\");\n   }\n   \n   @Override\n   public void schemaCheckVersion() {\n       try {\n           String dbVersion = getSchemaVersion();\n           if (!IdmEngine.VERSION.equals(dbVersion)) {\n               throw new FlowableWrongDbException(IdmEngine.VERSION, dbVersion);\n           }\n\n           String errorMessage = null;\n           if (!isTablePresent(IDM_PROPERTY_TABLE)) {\n               errorMessage = addMissingComponent(errorMessage, \"engine\");\n           }\n\n           if (errorMessage != null) {\n               throw new FlowableException(\"Flowable IDM database problem: \" + errorMessage);\n           }\n\n       } catch (Exception e) {\n           if (isMissingTablesException(e)) {\n               throw new FlowableException(\n                       \"no flowable tables in db. set <property name=\\\"databaseSchemaUpdate\\\" to value=\\\"true\\\" or value=\\\"create-drop\\\" (use create-drop for testing only!) in bean processEngineConfiguration in flowable.cfg.xml for automatic schema creation\",\n                       e);\n           } else {\n               if (e instanceof RuntimeException) {","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/db/IdmDbSchemaManager.java#L57-L93","documentation":"IdmDbSchemaManager.schemaCheckVersion() compares the IDM engine schema version recorded in the IDM property table against the running IdmEngine.VERSION. Flowable throws FlowableWrongDbException when they differ, refusing to run against a schema created by an incompatible engine version (and it also reports missing engine tables in the message).","triggerScenarios":"Starting/using the IDM engine after upgrading flowable-idm-engine jars without running the schema upgrade scripts; pointing the engine at a database created by an older/newer Flowable version; connecting to a database missing the IDM property table entirely.","commonSituations":"Dependency bumps (e.g. 6.x -> 7.x) without executing the DB upgrade SQL; shared database with another app running a different Flowable version; partial schema creation where tables exist but the version property row doesn't.","solutions":["Upgrade the database schema using the SQL upgrade scripts for your target Flowable version (org/flowable/idm/db/upgrade/*)","Align all flowable-* engine dependencies to the same version in your build","Point the engine at the correct database/schema it was provisioned against","If the schema is unused/dev-only, set databaseSchemaUpdate=true to create/upgrade automatically","If the exception reports missing tables, run the full create scripts for the current version"],"exampleFix":"// before\n<dependency>\n  <artifactId>flowable-idm-engine</artifactId>\n  <version>6.7.2</version>\n</dependency> <!-- engine 6.7.2 vs schema from 6.4.2 -->\n// after\n<dependency>\n  <artifactId>flowable-idm-engine</artifactId>\n  <version>6.4.2</version>\n</dependency> <!-- or run upgrade scripts 6.4.2 -> 6.7.2 -->","handlingStrategy":"try-catch","validationCode":"// check schema version before engine use\nString dbVersion = /* read from IDM property table via admin SQL */;\nif (!org.flowable.idm.engine.IdmEngine.VERSION.equals(dbVersion)) { runUpgradeScripts(dbVersion); }","typeGuard":"boolean schemaVersionMatches(String dbVersion) { return org.flowable.idm.engine.IdmEngine.VERSION.equals(dbVersion); }","tryCatchPattern":"try { idmEngineConfiguration.buildEngine(); } catch (FlowableWrongDbException e) { log.error(\"DB schema version \" + e.getDbVersion() + \" != engine \" + e.getLibraryVersion() + \"; run upgrade scripts\"); }","preventionTips":["Always run the Flowable DB upgrade scripts when bumping engine versions","Keep all flowable-* module versions aligned in your dependency management","Use databaseSchemaUpdate=true only in dev/test, never against shared DBs","Prevent multiple Flowable versions pointing at one database"],"tags":["flowable","idm","database","schema-version","upgrade"],"backgroundTag":"schema-validation-failed","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}