{"record":{"id":"b13be5e1d075fb7d","repo":"apache/seatunnel","slug":"database-s-does-not-exist-in-catalog-s-database","errorCode":null,"errorMessage":"Database %s does not exist in catalog %s (DatabaseNotExistException)","messagePattern":"Database (.+?) does not exist in catalog (.+?) \\(DatabaseNotExistException\\)","errorType":"exception","errorClass":"DatabaseNotExistException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/catalog/DorisCatalog.java","lineNumber":401,"sourceCode":"                        .name(columnName)\n                        .columnType(columnType)\n                        .dataType(dataType)\n                        .length(Math.max(charOctetLength, numberPrecision))\n                        .precision(numberPrecision)\n                        .scale(Math.max(numberScale, timePrecision))\n                        .nullable(isNullable)\n                        .defaultValue(defaultValue)\n                        .comment(comment)\n                        .build();\n        return typeConverter.convert(typeDefine);\n    }\n\n    @Override\n    public void createTable(TablePath tablePath, CatalogTable table, boolean ignoreIfExists)\n            throws TableAlreadyExistException, DatabaseNotExistException, CatalogException {\n\n        if (!databaseExists(tablePath.getDatabaseName())) {\n            throw new DatabaseNotExistException(catalogName, tablePath.getDatabaseName());\n        }\n\n        boolean tableExists = tableExists(tablePath);\n        if (ignoreIfExists && tableExists) {\n            LOG.info(\"table {} is exists, skip create\", tablePath.getFullName());\n            return;\n        }\n\n        if (tableExists) {\n            throw new TableAlreadyExistException(catalogName, tablePath);\n        }\n\n        String stmt =\n                DorisCatalogUtil.getCreateTableStatement(\n                        createTableTemplate, tablePath, table, typeConverter);\n        try (Statement statement = conn.createStatement()) {\n            statement.execute(stmt);\n        } catch (SQLException e) {","sourceCodeStart":383,"sourceCodeEnd":419,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/catalog/DorisCatalog.java#L383-L419","documentation":"DorisCatalog.createTable pre-checks the parent database and throws DatabaseNotExistException(catalogName, databaseName) when the target database does not exist, instead of implicitly creating it or failing with a raw SQL error.","triggerScenarios":"Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/catalog/DorisCatalog.java:401 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the database first or enable auto-create options","Fix the database name in the table path","Verify you are connected to the intended Doris cluster"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}