{"record":{"id":"098ccaf759c59fd2","repo":"apache/incubator-seata","slug":"unknown-dbtype-dbtype","errorCode":null,"errorMessage":"unknown dbtype:{dbType}","messagePattern":"unknown dbtype:(.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/seata/core/constants/DBType.java","lineNumber":214,"sourceCode":"\n    /**\n     * oscar db type.\n     */\n    OSCAR;\n\n    /**\n     * Valueof db type.\n     *\n     * @param dbType the db type\n     * @return the db type\n     */\n    public static DBType valueof(String dbType) {\n        for (DBType dt : values()) {\n            if (StringUtils.equalsIgnoreCase(dt.name(), dbType)) {\n                return dt;\n            }\n        }\n        throw new IllegalArgumentException(\"unknown dbtype:\" + dbType);\n    }\n}\n","sourceCodeStart":196,"sourceCodeEnd":217,"githubUrl":"https://github.com/apache/incubator-seata/blob/e01f97c6db397165050caa6764020410c2c8199a/core/src/main/java/org/apache/seata/core/constants/DBType.java#L196-L217","documentation":"Thrown by DBType.valueof(String) when the configured database type string does not equal (case-insensitively) any DBType enum constant (mysql, oracle, postgresql, etc.). It is used when resolving store.db.dbType on the TC server and by datasource parsers.","triggerScenarios":"Setting store.db.dbType (file.conf / application.yml on the server) to an unrecognized value such as 'postgres' (must be postgresql), 'maria', 'msql', or a value with stray whitespace/quotes; also reached by API code mapping a JDBC URL prefix to a DBType.","commonSituations":"Typo in server store configuration; using 'postgres' instead of 'postgresql'; copying a config written for a community fork; trailing whitespace from YAML copy-paste.","solutions":["Set store.db.dbType to the exact enum name, e.g. mysql, oracle, postgresql, db2, sqlserver, ... (case-insensitive but exact spelling).","If pointing at PostgreSQL, use 'postgresql', not 'postgres'.","Re-trim the config value and restart the server."],"exampleFix":"# before\nstore.db.dbType = postgres\n# after\nstore.db.dbType = postgresql","handlingStrategy":"validation","validationCode":"static boolean knownDb(String s) {\n    return Arrays.stream(DBType.values()).anyMatch(d -> d.name().equalsIgnoreCase(s == null ? \"\" : s.trim()));\n}","typeGuard":"static Optional<DBType> parseDb(String s) {\n    String n = s == null ? \"\" : s.trim();\n    return Arrays.stream(DBType.values()).filter(d -> d.name().equalsIgnoreCase(n)).findFirst();\n}","tryCatchPattern":null,"preventionTips":["Use 'postgresql' not 'postgres'","Maintain config templates reviewed against the current enum","Test server config in a staging boot before prod rollout"],"tags":["config","database","typo","server"],"backgroundTag":null,"analyzedSha":"e01f97c6db397165050caa6764020410c2c8199a","analyzedAt":"2026-08-14T10:23:53.097Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}