{"record":{"id":"3753930c2fc56cf2","repo":"apache/seatunnel","slug":"table-not-existed-375393","errorCode":"TABLE_NOT_EXISTED","errorMessage":"Table %s does not exist in Catalog %s.","messagePattern":"Table (.+?) does not exist in Catalog (.+?)\\.","errorType":"error_code","errorClass":"TableNotExistException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/iris/IrisCatalog.java","lineNumber":186,"sourceCode":"        try {\n            return queryString(defaultUrl, getListTableSql(schemaName), this::getTableName);\n        } catch (Exception e) {\n            throw new CatalogException(\n                    String.format(\"Failed listing database in catalog %s\", catalogName), e);\n        }\n    }\n\n    @Override\n    public CatalogTable getTable(String sqlQuery) throws SQLException {\n        Connection defaultConnection = getConnection(defaultUrl);\n        return CatalogUtils.getCatalogTable(defaultConnection, sqlQuery, new IrisTypeMapper());\n    }\n\n    @Override\n    public CatalogTable getTable(TablePath tablePath)\n            throws CatalogException, TableNotExistException {\n        if (!tableExists(tablePath)) {\n            throw new TableNotExistException(catalogName, tablePath);\n        }\n\n        String dbUrl;\n        if (StringUtils.isNotBlank(tablePath.getDatabaseName())) {\n            dbUrl = getUrlFromDatabaseName(tablePath.getDatabaseName());\n        } else {\n            dbUrl = getUrlFromDatabaseName(defaultDatabase);\n        }\n        try {\n            Connection conn = getConnection(dbUrl);\n            DatabaseMetaData metaData = conn.getMetaData();\n            try (ResultSet resultSet =\n                    metaData.getColumns(\n                            null, tablePath.getSchemaName(), tablePath.getTableName(), null)) {\n                Optional<PrimaryKey> primaryKey = getPrimaryKey(metaData, tablePath);\n                List<ConstraintKey> constraintKeys = getConstraintKeys(metaData, tablePath);\n                TableSchema.Builder builder = TableSchema.builder();\n                buildColumnsWithErrorCheck(tablePath, resultSet, builder);","sourceCodeStart":168,"sourceCodeEnd":204,"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#L168-L204","documentation":"Thrown by IrisCatalog.getTable(TablePath) when the existence pre-check tableExists returns false, via TableNotExistException(catalogName, tablePath). It means the requested table (or its database/schema path) was not found in the IRIS catalog.","triggerScenarios":"Calling getTable with a TablePath whose table does not exist in the mapped IRIS namespace; wrong database name in TablePath mapping to the wrong URL; case-sensitivity mismatch between the config and IRIS table names.","commonSituations":"Table name typo or wrong case (IRIS table names can be case-sensitive when quoted); table exists in a different namespace than the databaseName given; table was dropped/recreated between checks; SQL config referencing a table before it was created.","solutions":["Verify the table exists in the IRIS namespace with a direct SQL query (SELECT ... FROM table)","Check TablePath database/schema names — ensure getUrlFromDatabaseName maps to the correct IRIS namespace URL","Confirm exact name casing matches what IRIS stores","If creating the table programmatically, call createTable first with ignoreIfExists=true before getTable"],"exampleFix":"// before\nCatalogTable t = catalog.getTable(tablePath); // TableNotExistException\n// after\nif (catalog.tableExists(tablePath)) {\n    CatalogTable t = catalog.getTable(tablePath);\n} else {\n    catalog.createTable(tablePath, schema, true);\n}","handlingStrategy":"validation","validationCode":"if (!catalog.tableExists(tablePath)) {\n    catalog.createTable(tablePath, catalogTable, true); // ensure it exists\n}\nCatalogTable t = catalog.getTable(tablePath);","typeGuard":null,"tryCatchPattern":"try {\n    CatalogTable t = catalog.getTable(tablePath);\n} catch (TableNotExistException e) {\n    LOG.error(\"Table {} not found in {}; check names/casing\", tablePath.getFullName(), e.getCatalogName());\n    throw e;\n}","preventionTips":["Check tableExists before getTable","Match IRIS name casing exactly (quote identifiers if needed)","Confirm the databaseName in TablePath maps to the intended IRIS namespace","Create tables with ignoreIfExists=true before reading"],"tags":["jdbc","iris","table-not-found","catalog"],"backgroundTag":"entity-not-found","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"}