apache/seatunnel · error · CatalogException

Failed to get table:

Error message

Failed to get table: 

What it means

LanceCatalog.getTable catches exceptions while loading the table and inspects the error message: if it indicates the table does not exist ('Table does not exist', 'TABLE_NOT_FOUND', '404') it throws TableNotExistException; otherwise it wraps the original exception in a generic CatalogException 'Failed to get table: <name>'. This generic variant means table access failed for a non-not-found reason.

Source

Thrown at seatunnel-connectors-v2/connector-lance/src/main/java/org/apache/seatunnel/connectors/seatunnel/lance/catalog/LanceCatalog.java:216

                    convertTableSchema(arrowSchema, tablePath, arrowSchemaFromDataset);
            if (catalogTable == null) {
                throw new TableNotExistException(
                        catalogName,
                        tablePath,
                        new CatalogException(
                                "Table schema is null or empty. DescribeTable returned: "
                                        + (arrowSchema != null ? arrowSchema : "null schema")));
            }
            return catalogTable;
        } catch (Exception e) {
            String errorMsg = e.getMessage();
            if (errorMsg != null
                    && (errorMsg.contains("Table does not exist")
                            || errorMsg.contains("TABLE_NOT_FOUND")
                            || errorMsg.contains("404"))) {
                throw new TableNotExistException(catalogName, tablePath, e);
            } else {
                throw new CatalogException("Failed to get table: " + tablePath.getTableName(), e);
            }
        }
    }

    @Override
    public void createTable(TablePath tablePath, CatalogTable table, boolean ignoreIfExists)
            throws TableAlreadyExistException, DatabaseNotExistException, CatalogException {
        CreateTableRequest request = new CreateTableRequest();
        List<String> ids = Lists.newArrayList(tablePath.getTableName());
        request.setId(ids);
        byte[] requestData = new byte[0];
        try {
            requestData = SchemaUtils.convertJsonArrowSchemaToBytes(table.getTableSchema());
        } catch (IOException e) {
            throw new LanceConnectorException(
                    LanceConnectorErrorCode.TABLE_JSON_ARROW_SCHEMA_CONVERT_EXCEPTION,
                    e.getMessage());
        }

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Inspect the cause exception in the stack trace for the underlying storage/format error
  2. Verify storage credentials and network access to the warehouse location
  3. Check that the dataset was fully written and not corrupted; re-run the writing job if a partial write occurred
  4. Confirm Lance library version compatibility with the dataset format version
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-check existence and storage access
if (!lanceCatalog.tableExists(tablePath)) {
    throw new TableNotExistException(catalogName, tablePath);
}
assertStorageReadable(warehousePath);

Try / catch

try {
    catalogTable = lanceCatalog.getTable(tablePath);
} catch (TableNotExistException e) {
    // genuinely missing table
} catch (CatalogException e) {
    // storage/format failure: inspect cause, check credentials/network
}

Prevention

When it happens

Trigger: getTable fails while opening the Lance dataset for reasons other than non-existence — storage access errors, corrupted metadata, deserialization failures, permission problems, or incompatible dataset versions.

Common situations: Object storage credentials invalid or missing; network failure reaching S3/OSS; dataset manifest corrupted; Lance format version mismatch between writer and reader; partial write left the dataset unreadable.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/b203e4e5e1b339f4. Report an issue: GitHub.