{"record":{"id":"b43b52fd6c8e2ce9","repo":"apache/seatunnel","slug":"check-table-s-exists-failed","errorCode":null,"errorMessage":"check table [%s] exists failed","messagePattern":"check table \\[(.+?)\\] exists failed","errorType":"exception","errorClass":"CatalogException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/catalog/DorisCatalog.java","lineNumber":238,"sourceCode":"        } catch (SQLException e) {\n            throw new CatalogException(\n                    String.format(\"list tables of database [%s] failed\", databaseName), e);\n        }\n        Collections.sort(tables);\n        return tables;\n    }\n\n    @Override\n    public boolean tableExists(TablePath tablePath) throws CatalogException {\n        try (PreparedStatement ps =\n                conn.prepareStatement(DorisCatalogUtil.TABLES_QUERY_WITH_IDENTIFIER_QUERY)) {\n            ps.setString(1, tablePath.getDatabaseName());\n            ps.setString(2, tablePath.getTableName());\n            try (ResultSet rs = ps.executeQuery()) {\n                return rs.next();\n            }\n        } catch (SQLException e) {\n            throw new CatalogException(\n                    String.format(\"check table [%s] exists failed\", tablePath.getFullName()), e);\n        }\n    }\n\n    @Override\n    public CatalogTable getTable(TablePath tablePath)\n            throws CatalogException, TableNotExistException {\n\n        if (!tableExists(tablePath)) {\n            throw new TableNotExistException(catalogName, tablePath);\n        }\n        TableSchema.Builder builder = TableSchema.builder();\n        try (PreparedStatement ps = conn.prepareStatement(DorisCatalogUtil.TABLE_SCHEMA_QUERY)) {\n            ps.setString(1, tablePath.getDatabaseName());\n            ps.setString(2, tablePath.getTableName());\n            try (ResultSet rs = ps.executeQuery()) {\n                Map<String, String> options = connectorOptions();\n                buildTableSchemaWithErrorCheck(","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/catalog/DorisCatalog.java#L220-L256","documentation":"DorisCatalog.tableExists wraps SQLException from the table-existence query into CatalogException('check table [%s] exists failed'); the check itself failed (connection loss or SQL error), which is different from the table not existing.","triggerScenarios":"Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/catalog/DorisCatalog.java:238 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-establish or validate the JDBC connection before retrying the check","Verify the database-qualified table name is correct","Ensure the catalog user can query metadata about the table"],"exampleFix":null,"handlingStrategy":"retry","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"}