{"record":{"id":"ec66c82dcf5aeaff","repo":"flowable/flowable-engine","slug":"no-activiti-tables-in-db-set-property-name-data","errorCode":null,"errorMessage":"no activiti 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","messagePattern":"no activiti 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","errorType":"exception","errorClass":"ActivitiException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/db/DbSqlSession.java","lineNumber":946,"sourceCode":"            if (!ProcessEngine.VERSION.equals(dbVersion)) {\n                throw new ActivitiWrongDbException(ProcessEngine.VERSION, dbVersion);\n            }\n\n            String errorMessage = null;\n            if (!isEngineTablePresent()) {\n                errorMessage = addMissingComponent(errorMessage, \"engine\");\n            }\n            if (dbSqlSessionFactory.isDbHistoryUsed() && !isHistoryTablePresent()) {\n                errorMessage = addMissingComponent(errorMessage, \"history\");\n            }\n\n            if (errorMessage != null) {\n                throw new ActivitiException(\"Activiti database problem: \" + errorMessage);\n            }\n\n        } catch (Exception e) {\n            if (isMissingTablesException(e)) {\n                throw new ActivitiException(\n                        \"no activiti 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 ActivitiException(\"couldn't get db schema version\", e);\n                }\n            }\n        }\n\n        LOGGER.debug(\"activiti 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        }","sourceCodeStart":928,"sourceCodeEnd":964,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/db/DbSqlSession.java#L928-L964","documentation":"Inside dbSchemaCheckVersion()'s catch block, if the underlying exception looks like a 'missing tables' error (isMissingTablesException), it is rethrown as this ActivitiException with the hint to enable automatic schema creation. It means the schema check could not even find the Activiti tables — the database has none of the engine tables at all.","triggerScenarios":"get_dbversion or a table-presence probe fails because the ACT_* tables don't exist at all (e.g. query against ACT_GE_PROPERTY throws 'table not found'), with databaseSchemaUpdate disabled so nothing creates them.","commonSituations":"First boot against a brand-new empty database with databaseSchemaUpdate=false; pointing the engine at the wrong (empty) database; DB user permissions hiding the schema.","solutions":["Set <property name=\"databaseSchemaUpdate\" value=\"true\"/> (or create-drop in tests) in flowable.cfg.xml and restart so the schema is created automatically.","Run the distribution's create scripts for your database manually, then boot with schema update off.","Double-check the JDBC URL points at the database you initialized, and the user has access to the schema containing ACT_* tables."],"exampleFix":"// before\n<property name=\"databaseSchemaUpdate\" value=\"false\"/> // empty db\n\n// after\n<property name=\"databaseSchemaUpdate\" value=\"true\"/> // creates tables on first boot","handlingStrategy":"validation","validationCode":"// Detect an empty Activiti schema before boot\nInteger n = jdbcTemplate.queryForObject(\n    \"SELECT COUNT(*) FROM information_schema.tables WHERE table_name LIKE 'ACT_%'\", Integer.class);\nif (n == null || n == 0) {\n    // create schema: set databaseSchemaUpdate=true or run create scripts\n}","typeGuard":null,"tryCatchPattern":"try {\n    ProcessEngines.buildProcessEngine();\n} catch (ActivitiException e) {\n    if (e.getMessage().startsWith(\"no activiti tables in db\")) {\n        // enable databaseSchemaUpdate=true or run create scripts, then retry\n    }\n    throw e;\n}","preventionTips":["Initialize the DB (databaseSchemaUpdate=true or create scripts) before first production boot with checks enabled.","Confirm the JDBC URL targets the database you actually initialized.","Ensure the DB user can see the schema/tables — hidden tables masquerade as missing."],"tags":["database","schema","missing-tables","bootstrap"],"backgroundTag":"database-table-missing","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"}