{"record":{"id":"a7d6d61dec79e5c5","repo":"apache/seatunnel","slug":"failed-getting-table-s-a7d6d6","errorCode":null,"errorMessage":"Failed getting table %s","messagePattern":"Failed getting table (.+?)","errorType":"exception","errorClass":"CatalogException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/iris/IrisCatalog.java","lineNumber":219,"sourceCode":"                Optional<PrimaryKey> primaryKey = getPrimaryKey(metaData, tablePath);\n                List<ConstraintKey> constraintKeys = getConstraintKeys(metaData, tablePath);\n                TableSchema.Builder builder = TableSchema.builder();\n                buildColumnsWithErrorCheck(tablePath, resultSet, builder);\n                // add primary key\n                primaryKey.ifPresent(builder::primaryKey);\n                // add constraint key\n                constraintKeys.forEach(builder::constraintKey);\n                TableIdentifier tableIdentifier = getTableIdentifier(tablePath);\n                return CatalogTable.of(\n                        tableIdentifier,\n                        builder.build(),\n                        buildConnectorOptions(tablePath),\n                        Collections.emptyList(),\n                        \"\",\n                        catalogName);\n            }\n        } catch (Exception e) {\n            throw new CatalogException(\n                    String.format(\"Failed getting table %s\", tablePath.getFullName()), e);\n        }\n    }\n\n    @Override\n    public void createDatabase(TablePath tablePath, boolean ignoreIfExists)\n            throws DatabaseAlreadyExistException, CatalogException {\n        checkNotNull(tablePath.getDatabaseName(), \"Database name cannot be null\");\n        createDatabaseInternal(tablePath.getDatabaseName());\n    }\n\n    @Override\n    public void createTable(\n            TablePath tablePath, CatalogTable table, boolean ignoreIfExists, boolean createIndex)\n            throws TableAlreadyExistException, DatabaseNotExistException, CatalogException {\n        checkNotNull(tablePath, \"Table path cannot be null\");\n        if (defaultSchema.isPresent()) {\n            tablePath =","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/iris/IrisCatalog.java#L201-L237","documentation":"IrisCatalog.getTable wraps any exception raised while reading table metadata (after the existence check) into CatalogException(\"Failed getting table %s\"). Includes SQL errors from the metadata query, connection problems, or errors building the CatalogTable/connector options.","triggerScenarios":"Calling getTable(TablePath) when the metadata SELECT fails (SQLException), the connection URL from getUrlFromDatabaseName is bad, or catalog/connector option building throws for the discovered schema.","commonSituations":"IRIS datatype returned by the metadata query is unmappable to SeaTunnel types; transient connection drops; privileges to read column metadata missing; table altered concurrently so metadata query breaks.","solutions":["Inspect the chained cause for the concrete exception (SQL error vs. type-mapping error)","Re-run the metadata SQL manually in IRIS to see which column/datatype fails","Confirm the catalog user can read the table's column metadata (INFORMATION_SCHEMA/system views)","Retry on transient connection failures; verify URL and credentials from getUrlFromDatabaseName","If a datatype is unmappable, extend the IRIS type converter or cast the column in IRIS"],"exampleFix":"// before\nCatalogTable t = catalog.getTable(tablePath); // CatalogException\n// after\ntry {\n    CatalogTable t = catalog.getTable(tablePath);\n} catch (CatalogException e) {\n    LOG.error(\"getTable {} failed: {}\", tablePath.getFullName(), e.getCause());\n    throw e;\n}","handlingStrategy":"try-catch","validationCode":"if (!catalog.tableExists(tablePath)) {\n    throw new IllegalStateException(\"Table missing before getTable: \" + tablePath.getFullName());\n}","typeGuard":null,"tryCatchPattern":"try {\n    CatalogTable t = catalog.getTable(tablePath);\n} catch (CatalogException e) {\n    LOG.error(\"getTable {} failed: {}\", tablePath.getFullName(), e.getCause(), e);\n    throw e;\n}","preventionTips":["Read getCause() to distinguish SQL vs type-mapping failures","Verify the catalog user can read column metadata","Avoid concurrent ALTERs while reading metadata","Extend the IRIS type converter for unmappable datatypes"],"tags":["jdbc","iris","metadata","catalog"],"backgroundTag":"database-query-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}