flowable/flowable-engine · error · ActivitiException
no activiti tables in db. set <property name="databaseSchema
Error message
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
What it means
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.
Source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/db/DbSqlSession.java:946
if (!ProcessEngine.VERSION.equals(dbVersion)) {
throw new ActivitiWrongDbException(ProcessEngine.VERSION, dbVersion);
}
String errorMessage = null;
if (!isEngineTablePresent()) {
errorMessage = addMissingComponent(errorMessage, "engine");
}
if (dbSqlSessionFactory.isDbHistoryUsed() && !isHistoryTablePresent()) {
errorMessage = addMissingComponent(errorMessage, "history");
}
if (errorMessage != null) {
throw new ActivitiException("Activiti database problem: " + errorMessage);
}
} catch (Exception e) {
if (isMissingTablesException(e)) {
throw new ActivitiException(
"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",
e);
} else {
if (e instanceof RuntimeException) {
throw (RuntimeException) e;
} else {
throw new ActivitiException("couldn't get db schema version", e);
}
}
}
LOGGER.debug("activiti db schema check successful");
}
protected String addMissingComponent(String missingComponents, String component) {
if (missingComponents == null) {
return "Tables missing for component(s) " + component;
}View on GitHub (pinned to d6d39ce1c6)
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.
Example fix
// before <property name="databaseSchemaUpdate" value="false"/> // empty db // after <property name="databaseSchemaUpdate" value="true"/> // creates tables on first boot
Defensive patterns
Strategy: validation
Validate before calling
// Detect an empty Activiti schema before boot
Integer n = jdbcTemplate.queryForObject(
"SELECT COUNT(*) FROM information_schema.tables WHERE table_name LIKE 'ACT_%'", Integer.class);
if (n == null || n == 0) {
// create schema: set databaseSchemaUpdate=true or run create scripts
} Try / catch
try {
ProcessEngines.buildProcessEngine();
} catch (ActivitiException e) {
if (e.getMessage().startsWith("no activiti tables in db")) {
// enable databaseSchemaUpdate=true or run create scripts, then retry
}
throw e;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Flowable database problem: ${errorMessage}
- Flowable database problem: ${errorMessage}
- Flowable IDM database problem: ${errorMessage}
- no flowable tables in db. set <property name="databaseSchema
- Activiti database problem: <errorMessage>
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/ec66c82dcf5aeaff.
Report an issue: GitHub.