{"record":{"id":"8f9c9c8a97c7539c","repo":"flowable/flowable-engine","slug":"couldn-t-get-context-db-schema-version","errorCode":null,"errorMessage":"couldn't get ${context} db schema version","messagePattern":"couldn't get (.+?) db schema version","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/EngineSqlScriptBasedDbSchemaManager.java","lineNumber":73,"sourceCode":"            String errorMessage = null;\n            if (!isEngineTablePresent()) {\n                errorMessage = addMissingComponent(errorMessage, context);\n            }\n\n            if (errorMessage != null) {\n                throw new FlowableException(\"Flowable 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 \\\"databaseSchemaUpdate\\\" \\\"true\\\" or value=\\\"create-drop\\\" (use create-drop for testing only!) for automatic schema creation\",\n                        e);\n            } else {\n                if (e instanceof RuntimeException) {\n                    throw (RuntimeException) e;\n                } else {\n                    throw new FlowableException(\"couldn't get \" + context + \" db schema version\", e);\n                }\n            }\n        }\n\n        logger.debug(\"flowable {} db schema check successful\", context);\n    }\n\n    @Override\n    public void schemaCreate() {\n\n        if (lockConfiguration.isUseLockForDatabaseSchemaUpdate()) {\n            LockManager lockManager = lockConfiguration.getLockManager(getDbSchemaLockName());\n            lockManager.waitForLockRunAndRelease(lockConfiguration.getSchemaLockWaitTime(), () -> {\n                schemaCreateInLock();\n                return null;\n            });\n        } else {\n            schemaCreateInLock();","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/EngineSqlScriptBasedDbSchemaManager.java#L55-L91","documentation":"Generic wrap-around thrown in schemaCheckVersion: a non-missing-tables exception occurred while reading the DB schema version for the given context (e.g. 'process engine', 'identity', 'cmmn'). The original exception is preserved as the cause; the message just reports Flowable could not determine the installed schema version.","triggerScenarios":"schemaCheckVersion queries the version table (e.g. SELECT VALUE_ FROM ACT_GE_PROPERTY WHERE NAME_='schema.version') and any unexpected exception other than a missing-tables error occurs: SQL syntax errors, corrupted/renamed property table, connection drops mid-query, driver incompatibility, table present but unreadable.","commonSituations":"Partially created or manually altered schema (ACT_GE_PROPERTY dropped or rows deleted); database outage or network failure during engine boot; using a Flowable version with a DB not on the supported list; permissions revoked on the property table.","solutions":["Inspect the wrapped cause (e.getCause()) for the real SQL error and fix that first.","Verify the version/property table exists and contains the schema.version/schema.history rows (recreate schema or run upgrade scripts).","Test DB connectivity and credentials with a plain JDBC query before engine startup.","Confirm the database and driver are supported by your Flowable version; run the official upgrade SQL scripts after upgrading."],"exampleFix":"// diagnose\ntry {\n  engineConfig.buildProcessEngine();\n} catch (FlowableException e) {\n  e.getCause().printStackTrace(); // real SQL problem\n}","handlingStrategy":"try-catch","validationCode":"try (Statement s = c.createStatement()) { ResultSet rs = s.executeQuery(\"SELECT VALUE_ FROM ACT_GE_PROPERTY WHERE NAME_='schema.version'\"); }","typeGuard":null,"tryCatchPattern":"catch (FlowableException e) { log.error(\"schema version lookup failed; cause:\", e.getCause()); throw e; }","preventionTips":["Don't hand-edit or delete rows in ACT_GE_PROPERTY.","Monitor DB availability before engine boot.","Keep schema changes to official Flowable scripts only.","Grant the engine's DB user full rights on Flowable tables."],"tags":["database","schema","sql","flowable"],"backgroundTag":"database-query-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"}