{"record":{"id":"c5ac54270fd734fd","repo":"flowable/flowable-engine","slug":"couldn-t-check-if-tables-are-already-present-using","errorCode":null,"errorMessage":"couldn't check if tables are already present using metadata: ${e.getMessage()}","messagePattern":"couldn't check if tables are already present using metadata: (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/AbstractSqlScriptBasedDbSchemaManager.java","lineNumber":166,"sourceCode":"            if (catalog != null && catalog.length() == 0) {\n                catalog = null;\n            }\n\n            try {\n                tables = databaseMetaData.getTables(catalog, schema, tableName, JDBC_METADATA_TABLE_TYPES);\n                return tables.next();\n            } finally {\n                try {\n                    if (tables != null) {\n                        tables.close();\n                    }\n                } catch (Exception e) {\n                    logger.error(\"Error closing meta data tables\", e);\n                }\n            }\n\n        } catch (Exception e) {\n            throw new FlowableException(\"couldn't check if tables are already present using metadata: \" + e.getMessage(), e);\n        }\n    }\n    \n    protected String prependDatabaseTablePrefix(String tableName) {\n        return getDatabaseConfiguration().getDatabaseTablePrefix() + tableName;\n    }\n    \n    public String getProperty(String propertyName) {\n        return getProperty(propertyName, true);\n    }\n\n    public String getProperty(String propertyName, boolean checkPropertyTablePresent) {\n        String tableName = getPropertyTable();\n       \n        if (checkPropertyTablePresent && !isTablePresent(tableName)) { // isTablePresent will add the prefix, so adding it later\n            return null;\n        }\n        ","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/AbstractSqlScriptBasedDbSchemaManager.java#L148-L184","documentation":"AbstractSqlScriptBasedDbSchemaManager.isTablePresent inspects JDBC database metadata to detect whether Flowable tables exist. Any exception during that metadata inspection is rethrown as a FlowableException with the underlying message. The engine cannot safely determine schema state, so schema install/upgrade aborts.","triggerScenarios":"isTablePresent running against a database whose metadata calls fail — wrong credentials, unreachable DB, driver quirks, closed connection, or restrictive permissions on DatabaseMetaData.","commonSituations":"First engine boot against a misconfigured datasource; databases with non-standard JDBC metadata behavior; network/firewall interruptions during startup; using an unsupported or broken JDBC driver.","solutions":["Fix the underlying datasource configuration (URL, user, password) and confirm connectivity with a plain JDBC ping.","Read the chained cause exception for the real failure (SQL error, connection refused) and address it.","Verify the JDBC driver version matches the database and is on the classpath."],"exampleFix":"// before (flowable.cfg)\n<property name=\"jdbcUrl\" value=\"jdbc:mysql://localhost:3306/flowable\"/>\n// after\n<property name=\"jdbcUrl\" value=\"jdbc:mysql://localhost:3306/flowable?useSSL=false\"/>\n<property name=\"jdbcUsername\" value=\"flowable\"/>\n<property name=\"jdbcPassword\" value=\"flowable\"/>","handlingStrategy":"retry","validationCode":"try (Connection c = dataSource.getConnection()) { DatabaseMetaData md = c.getMetaData(); md.getTables(null, null, \"ACT_GE_PROPERTY\", null); } // sanity check before engine startup","typeGuard":null,"tryCatchPattern":"try { processEngine = engineCfg.buildProcessEngine(); } catch (FlowableException e) { log.error(\"schema metadata check failed: {}\", e.getCause(), e.getCause()); throw e; }","preventionTips":["Validate datasource connectivity with a plain JDBC call before engine bootstrap","Keep the JDBC driver current and matched to the database version","Verify DB user has metadata read privileges","Inspect getCause() for the real underlying failure"],"tags":["database","schema-management","jdbc-metadata"],"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"}