{"record":{"id":"61a5078462a8ead1","repo":"flowable/flowable-engine","slug":"couldn-t-deduct-database-type-from-database-produc","errorCode":null,"errorMessage":"couldn't deduct database type from database product name '${databaseProductName}'","messagePattern":"couldn't deduct database type from database product name '(.+?)'","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"critical","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/util/DbUtil.java","lineNumber":111,"sourceCode":"            // CRDB does not expose the version through the jdbc driver, so we need to fetch it through version().\n            if (PRODUCT_NAME_POSTGRES.equalsIgnoreCase(databaseProductName)) {\n                try (PreparedStatement preparedStatement = connection.prepareStatement(\"select version() as version;\");\n                     ResultSet resultSet = preparedStatement.executeQuery()) {\n                    String version = null;\n                    if (resultSet.next()) {\n                        version = resultSet.getString(\"version\");\n                    }\n\n                    if (StringUtils.isNotEmpty(version) && version.toLowerCase().startsWith(PRODUCT_NAME_CRDB.toLowerCase())) {\n                        databaseProductName = PRODUCT_NAME_CRDB;\n                        logger.info(\"CockroachDB version '{}' detected\", version);\n                    }\n                }\n            }\n\n            databaseType = databaseTypeMappings.getProperty(databaseProductName);\n            if (databaseType == null) {\n                throw new FlowableException(\"couldn't deduct database type from database product name '\" + databaseProductName + \"'\");\n            }\n            logger.debug(\"using database type: {}\", databaseType);\n\n        } catch (SQLException e) {\n            throw new RuntimeException(\"Exception while initializing Database connection\", e);\n        } finally {\n            try {\n                if (connection != null) {\n                    connection.close();\n                }\n            } catch (SQLException e) {\n                logger.error(\"Exception while closing the Database connection\", e);\n            }\n        }\n\n        return databaseType;\n    }\n","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/util/DbUtil.java#L93-L129","documentation":"DbUtil.determineDatabaseType inspects the JDBC database product name and maps it to a Flowable database type. If the product name has no entry in the databaseTypeMappings properties, it throws FlowableException because Flowable does not support that database.","triggerScenarios":"Pointing the Flowable engine at an unsupported database (or a driver reporting an unusual/unknown product name), e.g. a new fork, embedded DB, or proxy whose product name differs from the standard.","commonSituations":"Connecting to unsupported DBs like SAP HANA variants, CockroachDB, or a driver misreporting productName; typo in jdbc url so an unexpected driver/database is used; Flowable version predating support for your database.","solutions":["Use a database supported by your Flowable version (H2, MySQL, MariaDB, PostgreSQL, Oracle, SQL Server, DB2)","Upgrade Flowable if your database is supported only in newer versions","Check the JDBC driver is correct so DatabaseMetaData.getDatabaseProductName returns a standard name","Extend databaseTypeMappings if you must add a custom mapping (advanced)"],"exampleFix":"// before (flowable.cfg)\njdbcUrl=jdbc:sqlite:app.db\n// after\njdbcUrl=jdbc:h2:~/flowable-db;AUTO_SERVER=TRUE","handlingStrategy":"try-catch","validationCode":"try (Connection c = dataSource.getConnection()) {\n    String product = c.getMetaData().getDatabaseProductName();\n    Set<String> supported = Set.of(\"H2\", \"MySQL\", \"MariaDB\", \"PostgreSQL\", \"Oracle\", \"Microsoft SQL Server\", \"DB2\");\n    if (supported.stream().noneMatch(product::contains)) {\n        logger.error(\"Unsupported database product: {}\", product);\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    engineConfig.buildEngine();\n} catch (FlowableException e) {\n    if (e.getMessage().startsWith(\"couldn't deduct database type\")) {\n        logger.error(\"Unsupported database: {}\", e.getMessage());\n    }\n}","preventionTips":["Verify your database is on the supported list for your Flowable version","Use the vendor's official JDBC driver so getDatabaseProductName is standard","Pin supported database versions in deployment docs"],"tags":["flowable","database","unsupported-database","engine-config"],"backgroundTag":"unsupported-database","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}