{"record":{"id":"f6bea344837f9950","repo":"apache/seatunnel","slug":"failed-listing-database-in-catalog-s-f6bea3","errorCode":null,"errorMessage":"Failed listing database in catalog %s","messagePattern":"Failed listing database in catalog (.+?)","errorType":"exception","errorClass":"CatalogException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/catalog/StarRocksCatalog.java","lineNumber":127,"sourceCode":"        this.username = username;\n        this.pwd = pwd;\n        this.template = template;\n        this.tableOptions = tableOptions;\n    }\n\n    @Override\n    public List<String> listDatabases() throws CatalogException {\n        try (PreparedStatement ps = conn.prepareStatement(\"SHOW DATABASES;\");\n                ResultSet rs = ps.executeQuery()) {\n            List<String> databases = new ArrayList<>();\n\n            while (rs.next()) {\n                databases.add(rs.getString(1));\n            }\n\n            return databases;\n        } catch (Exception e) {\n            throw new CatalogException(\n                    String.format(\"Failed listing database in catalog %s\", this.catalogName), e);\n        }\n    }\n\n    @Override\n    public List<String> listTables(String databaseName)\n            throws CatalogException, DatabaseNotExistException {\n        if (!databaseExists(databaseName)) {\n            throw new DatabaseNotExistException(this.catalogName, databaseName);\n        }\n\n        try (PreparedStatement ps =\n                conn.prepareStatement(\n                        \"SELECT TABLE_NAME FROM information_schema.tables \"\n                                + \"WHERE TABLE_SCHEMA = ? ORDER BY TABLE_NAME\")) {\n            ps.setString(1, databaseName);\n            try (ResultSet rs = ps.executeQuery()) {\n                List<String> tables = new ArrayList<>();","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/catalog/StarRocksCatalog.java#L109-L145","documentation":"This error is a generic CatalogException wrapper thrown by StarRocksCatalog.listDatabases when executing 'SHOW DATABASES' against the StarRocks FE fails. It fires for any underlying failure — connection loss, authentication failure with username/pwd, or a JDBC/SQL error — and it is raised both on direct catalog listing and via databaseExists, so a bad connection or wrong credentials in the catalog config typically surfaces here.","triggerScenarios":"Thrown at seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/catalog/StarRocksCatalog.java:127 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the StarRocks FE JDBC URL, credentials, and connectivity","Check that the user has privileges to list databases","Inspect the wrapped SQLException for the FE-side error"],"exampleFix":null,"handlingStrategy":"try-catch","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"}