{"record":{"id":"46325cdfc4e97df1","repo":"flowable/flowable-engine","slug":"couldn-t-get-db-schema-version-46325c","errorCode":null,"errorMessage":"couldn't get db schema version","messagePattern":"couldn't get db schema version","errorType":"console","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/db/IdmDbSchemaManager.java","lineNumber":96,"sourceCode":"           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) {\n                   throw (RuntimeException) e;\n               } else {\n                   throw new FlowableException(\"couldn't get db schema version\", e);\n               }\n           }\n       }\n\n       logger.debug(\"flowable idm db schema check successful\");\n   }\n   \n   protected String addMissingComponent(String missingComponents, String component) {\n       if (missingComponents == null) {\n           return \"Tables missing for component(s) \" + component;\n       }\n       return missingComponents + \", \" + component;\n   }\n\n   @Override\n   public String getContext() {\n       return SCHEMA_COMPONENT;\n   }","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/db/IdmDbSchemaManager.java#L78-L114","documentation":"Generic wrapper thrown when schemaCheckVersion fails with a checked (non-Runtime) exception that is not a missing-tables error. Flowable rethrows RuntimeExceptions as-is but wraps checked exceptions in a FlowableException with this fixed message, preserving the cause.","triggerScenarios":"Any checked exception during the IDM schema version check that is not classified as a missing-tables exception — e.g. SQL syntax errors, driver-level SQLExceptions, connection failures surfaced as checked exceptions.","commonSituations":"Unsupported JDBC driver; database connectivity problems (wrong host/port, TLS issues); database user lacking privileges to query ACT_ID_PROPERTY.","solutions":["Inspect the cause (getCause()) for the real exception — the message itself is generic.","Verify DB connectivity: URL, credentials, and that the database is reachable from the app.","Ensure the JDBC driver matches your database vendor and version.","Grant the DB user rights to read the Flowable schema tables, then restart."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// pre-check connectivity before engine bootstrap\ntry (Connection c = dataSource.getConnection()) { /* db reachable */ }","typeGuard":null,"tryCatchPattern":"try {\n  idmEngine = config.buildEngine();\n} catch (FlowableException e) {\n  if (\"couldn't get db schema version\".equals(e.getMessage())) {\n    log.error(\"Schema check failed\", e.getCause()); // real root cause is in getCause()\n  }\n  throw e;\n}","preventionTips":["Always inspect getCause() — this message hides the real exception.","Use a driver version certified for your database.","Test DB connectivity and credentials before engine startup.","Grant the app DB user read access to the Flowable schema."],"tags":["database","schema-check","wrapped-exception"],"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-14T11:17:12.474Z"}