{"record":{"id":"06ee10dc78a47cb6","repo":"apache/seatunnel","slug":"table-tablepath-databasename-null-schemaname-06ee10","errorCode":null,"errorMessage":"Table 'TablePath{databaseName='null', schemaName='null', tableName='null'}' already exists in catalog 'null'","messagePattern":"Table 'TablePath(.+?)' already exists in catalog 'null'","errorType":"exception","errorClass":"TableAlreadyExistException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/AbstractJdbcCatalog.java","lineNumber":484,"sourceCode":"            throws TableAlreadyExistException, DatabaseNotExistException, CatalogException {\n        checkNotNull(tablePath, \"Table path cannot be null\");\n\n        if (!databaseExists(tablePath.getDatabaseName())) {\n            throw new DatabaseNotExistException(catalogName, tablePath.getDatabaseName());\n        }\n        if (defaultSchema.isPresent()) {\n            tablePath =\n                    new TablePath(\n                            tablePath.getDatabaseName(),\n                            defaultSchema.get(),\n                            tablePath.getTableName());\n        }\n\n        if (tableExists(tablePath)) {\n            if (ignoreIfExists) {\n                return;\n            }\n            throw new TableAlreadyExistException(catalogName, tablePath);\n        }\n\n        createTableInternal(tablePath, table, createIndex);\n    }\n\n    protected String getCreateTableSql(\n            TablePath tablePath, CatalogTable table, boolean createIndex) {\n        throw new UnsupportedOperationException();\n    }\n\n    protected List<String> getCreateTableSqls(\n            TablePath tablePath, CatalogTable table, boolean createIndex) {\n        return Collections.singletonList(getCreateTableSql(tablePath, table, createIndex));\n    }\n\n    protected void createTableInternal(TablePath tablePath, CatalogTable table, boolean createIndex)\n            throws CatalogException {\n        String dbUrl = getUrlFromDatabaseName(tablePath.getDatabaseName());","sourceCodeStart":466,"sourceCodeEnd":502,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/AbstractJdbcCatalog.java#L466-L502","documentation":"Thrown by AbstractJdbcCatalog.createTable when the target table already exists and ignoreIfExists is false; the standard TableAlreadyExistException sentinel rendered with the (possibly null-field) TablePath and catalog name identifying the conflict.","triggerScenarios":"Calling createTable(..., ignoreIfExists=false) for a table that already exists — e.g. re-running a non-idempotent schema-migration job.","commonSituations":"Idempotency issues: job reruns after partial failure; multiple pipelines creating the same table concurrently; developer forgot to set ignoreIfExists=true for upsert-style workflows.","solutions":["Pass ignoreIfExists=true (in the 4-arg overload) if re-running should be a no-op","Drop the existing table first with catalog.dropTable(path, false) if replacement is intended","Use a distinct table name or versioned table names for each run","Catch TableAlreadyExistException and treat as success in idempotent pipelines"],"exampleFix":"// before\ncatalog.createTable(path, table, false); // fails on rerun\n// after\ncatalog.createTable(path, table, true); // ignore if already exists","handlingStrategy":"try-catch","validationCode":"boolean exists;\ntry {\n    exists = catalog.tableExists(path);\n} catch (Exception e) { exists = false; }\nif (exists) { /* skip or drop first */ }","typeGuard":null,"tryCatchPattern":"try {\n    catalog.createTable(path, table, false);\n} catch (TableAlreadyExistException e) {\n    // idempotent rerun: treat as success\n}","preventionTips":["Set ignoreIfExists=true for rerunnable pipelines","Make migrations idempotent (create-if-not-exists semantics)","Serialize schema migrations to avoid concurrent create races"],"tags":["jdbc","catalog","table-already-exists","ddl","idempotency"],"backgroundTag":"file-already-exists","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"}