{"record":{"id":"6bebb1667eed8dfa","repo":"flowable/flowable-engine","slug":"version-mismatch-library-version-is-flowableve","errorCode":null,"errorMessage":"version mismatch: library version is '${FlowableVersions.CURRENT_VERSION}', db version is ${dbVersion} Hint: 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","messagePattern":"version mismatch: library version is '(.+?)', db version is (.+?) Hint: 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","errorType":"exception","errorClass":"FlowableWrongDbException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/ServiceSqlScriptBasedDbSchemaManager.java","lineNumber":39,"sourceCode":" */\npublic abstract class ServiceSqlScriptBasedDbSchemaManager extends AbstractSqlScriptBasedDbSchemaManager {\n    \n    protected String table;\n    protected String schemaComponent;\n    protected String schemaVersionProperty;\n    \n    public ServiceSqlScriptBasedDbSchemaManager(String table, String schemaComponent, String schemaVersionProperty) {\n        this.table = table;\n        this.schemaComponent = schemaComponent;\n        this.schemaVersionProperty = schemaVersionProperty;\n    }\n    \n    @Override\n    public void schemaCreate() {\n        if (isUpdateNeeded()) {\n            String dbVersion = getSchemaVersion();\n            if (!FlowableVersions.CURRENT_VERSION.equals(dbVersion)) {\n                throw new FlowableWrongDbException(FlowableVersions.CURRENT_VERSION, dbVersion);\n            }\n        } else {\n            internalDbSchemaCreate();\n        }\n    }\n\n    protected void internalDbSchemaCreate() {\n        executeMandatorySchemaResource(\"create\", schemaComponent);\n    }\n\n    @Override\n    public void schemaDrop() {\n        try {\n            executeMandatorySchemaResource(\"drop\", schemaComponent);\n        } catch (Exception e) {\n            logger.info(\"Error dropping {} tables\", schemaComponent, e);\n        }\n    }","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/ServiceSqlScriptBasedDbSchemaManager.java#L21-L57","documentation":"FlowableWrongDbException from ServiceSqlScriptBasedDbSchemaManager.schemaCreate (reached via schemaUpdate): the service-engine tables exist but the version recorded in the schema (getSchemaVersion()) differs from FlowableVersions.CURRENT_VERSION. Flowable service modules (e.g. event registry, service registry, idm) enforce exact schema/library version parity.","triggerScenarios":"Booting a service engine module when its tables were created by a different Flowable release: dependency upgraded without running the module's upgrade scripts, mixed module versions (one module newer than others), or DB shared between deployments of different versions.","commonSituations":"Partial upgrade — core engine upgraded but service module schema left old; multiple microservices sharing one DB with different Flowable versions; reverting a release without downgrading the schema.","solutions":["Run the module's upgrade SQL scripts to bring its schema to the current version, or set databaseSchemaUpdate=\"true\" once to auto-upgrade.","Align all Flowable module dependencies in your build to the same version (e.g. via flowable-root/BOM).","If a rollback caused it, redeploy the matching library version or downgrade the schema with the appropriate scripts.","Verify with SELECT on the module's version/property table which version the DB actually holds."],"exampleFix":"// before: mixed versions\n<dependency><artifactId>flowable-engine</artifactId><version>7.0.0</version></dependency>\n<dependency><artifactId>flowable-event-registry</artifactId><version>6.8.0</version></dependency>\n// after: align via BOM\n<dependencyManagement><dependency><groupId>org.flowable</groupId><artifactId>flowable-bom</artifactId><version>7.0.0</version><type>pom</type><scope>import</scope></dependency></dependencyManagement>","handlingStrategy":"validation","validationCode":"String dbVer = jdbcQuery(\"SELECT VERSION_ FROM FLW_EV_DATABASECHANGELOGLOCK\") /* module property table */;\nif (!dbVer.equals(flowableVersion)) runUpgradeScripts();","typeGuard":null,"tryCatchPattern":"catch (FlowableWrongDbException e) { log.error(\"service schema lib {} vs db {}\", e.getLibraryVersion(), e.getDbVersion()); /* align versions / run upgrade */ throw e; }","preventionTips":["Import flowable-bom to keep all module versions identical.","Run each module's upgrade scripts on every Flowable upgrade.","Never share one DB across differently-versioned deployments.","Set databaseSchemaUpdate=true for one controlled upgrade boot."],"tags":["database","schema","version-mismatch","upgrade","flowable"],"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-14T05:17:10.506Z"}