flowable/flowable-engine · error · FlowableException

couldn't get flowable table names using metadata: " + e.getM

Error message

couldn't get flowable table names using metadata: " + e.getMessage()

What it means

Thrown when Flowable cannot list its table names via JDBC DatabaseMetaData. The method queries metadata with ACT_/FLW_ name filters and rethrows any exception with this message, so the JDBC error text is appended.

Source

Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/persistence/entity/TableDataManagerImpl.java:82

    @Override
    public List<String> getTablesPresentInDatabase() {
        List<String> tableNames = new ArrayList<>();
        try {
            Connection connection = getDbSqlSession().getSqlSession().getConnection();
            DatabaseMetaData databaseMetaData = connection.getMetaData();
            LOGGER.debug("retrieving flowable tables from jdbc metadata");
            String databaseTablePrefix = getDbSqlSession().getDbSqlSessionFactory().getDatabaseTablePrefix();
            String actTableNameFilter = getTableNameFilter(databaseMetaData, databaseTablePrefix, "ACT");
            String flwTableNameFilter = getTableNameFilter(databaseMetaData, databaseTablePrefix, "FLW");

            String catalog = getDatabaseCatalog();

            String schema = getDatabaseSchema();

            tableNames.addAll(getTableNames(databaseMetaData, catalog, schema, actTableNameFilter));
            tableNames.addAll(getTableNames(databaseMetaData, catalog, schema, flwTableNameFilter));
        } catch (Exception e) {
            throw new FlowableException("couldn't get flowable table names using metadata: " + e.getMessage(), e);
        }
        return tableNames;
    }

    protected String getTableNameFilter(DatabaseMetaData databaseMetaData, String databaseTablePrefix, String flowableTablePrefix) throws SQLException {
        // We are using the search string escape for the filter since the underscore character (_) means match any character when used in LIKE.
        // However, we want to get the tables that do have that charactery literally
        String tableNameFilter;
        if ("postgres".equals(getDbSqlSession().getDbSqlSessionFactory().getDatabaseType())
                || "cockroachdb".equals(getDbSqlSession().getDbSqlSessionFactory().getDatabaseType())) {
            tableNameFilter = databaseTablePrefix + flowableTablePrefix.toLowerCase(Locale.ROOT) + databaseMetaData.getSearchStringEscape() + "_%";
        } else {
            tableNameFilter = databaseTablePrefix + flowableTablePrefix + databaseMetaData.getSearchStringEscape() + "_%";
        }

        return tableNameFilter;
    }

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Read e.getCause()/message for the JDBC metadata error
  2. Set the correct databaseSchema / catalog in the engine configuration
  3. Use a JDBC driver that fully supports DatabaseMetaData for your database
  4. Grant the user permission to read table metadata (e.g. via information_schema)
Defensive patterns

Strategy: try-catch

Validate before calling

try (Connection c = dataSource.getConnection()) {
    DatabaseMetaData md = c.getMetaData();
    md.getTables(null, schema, "ACT_%", new String[]{"TABLE"}); // probe metadata access
}

Try / catch

try {
    List<String> tables = managementService.getTableNames();
} catch (FlowableException e) {
    LOGGER.error("Metadata listing failed: {}", e.getMessage(), e);
}

Prevention

When it happens

Trigger: Calling getTablesPresentInDatabase() (e.g. from getTableCount() or schema management) when databaseMetaData.getTables() throws: bad catalog/schema, metadata access denied, connection failure, or an unsupported database returning invalid metadata.

Common situations: JDBC driver lacks proper DatabaseMetaData support; wrong database schema/catalog configured; user lacks metadata read privileges; typo'd or unsupported database product name in configuration.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/06adfc03b39a88af. Report an issue: GitHub.