{"record":{"id":"2e4dc6630f935ea7","repo":"apache/seatunnel","slug":"list-tables-of-database-s-failed","errorCode":null,"errorMessage":"list tables of database [%s] failed","messagePattern":"list tables of database \\[(.+?)\\] 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":221,"sourceCode":"        Collections.sort(databases);\n        return databases;\n    }\n\n    @Override\n    public List<String> listTables(String databaseName)\n            throws CatalogException, DatabaseNotExistException {\n        List<String> tables = new ArrayList<>();\n        try (PreparedStatement ps =\n                conn.prepareStatement(DorisCatalogUtil.TABLES_QUERY_WITH_DATABASE_QUERY)) {\n            ps.setString(1, databaseName);\n            try (ResultSet rs = ps.executeQuery()) {\n                while (rs.next()) {\n                    String table = rs.getString(1);\n                    tables.add(table);\n                }\n            }\n        } 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);","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/catalog/DorisCatalog.java#L203-L239","documentation":"DorisCatalog.listTables wraps SQLException from the per-database table listing query into CatalogException('list tables of database [%s] failed'); enumeration failed due to connection issues, missing database, or insufficient privileges.","triggerScenarios":"Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/catalog/DorisCatalog.java:221 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the database exists and the user has privileges on it","Check connection stability to the FE","Inspect FE audit logs for the failing table-listing query"],"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"}