apache/seatunnel · error · FileConnectorException

CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION

CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION

Error message

Archived entry [%s] is %,d bytes, larger than POI limit %,d bytes. Please set excel_engine = EasyExcel, or increase the limit if POI is required.

What it means

AbstractReadStrategy.assertArchiveEntrySize enforces a size cap on individual entries inside compressed archives (zip/tar) when the POI-based Excel reader is used, because POI loads the whole entry into memory and is vulnerable to decompression bombs. When an entry's declared size exceeds the configured POI limit, a FileConnectorException with CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION is thrown before the entry is read.

Source

Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/AbstractReadStrategy.java:565

                        output,
                        hadoopFileSystemProxy.getInputStream(path),
                        partitionsMap,
                        path);
        }
    }

    /**
     * Rejects an archive entry whose declared size exceeds the configured POI limit.
     *
     * @param entryName archive entry name used in the error message
     * @param entrySize declared uncompressed entry size in bytes
     * @param maxBytes maximum allowed size in bytes; non-positive values disable the limit
     */
    private void assertArchiveEntrySize(String entryName, long entrySize, long maxBytes) {
        if (maxBytes <= 0 || entrySize <= 0 || entrySize <= maxBytes) {
            return;
        }
        throw new FileConnectorException(
                CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION,
                String.format(
                        "Archived entry [%s] is %,d bytes, larger than POI limit %,d bytes. "
                                + "Please set excel_engine = EasyExcel, or increase the limit if POI is required.",
                        entryName, entrySize, maxBytes));
    }

    protected void readProcess(
            FileSourceSplit split,
            Collector<SeaTunnelRow> output,
            InputStream inputStream,
            Map<String, String> partitionsMap,
            String currentFileName)
            throws IOException {
        throw new UnsupportedOperationException(
                "The file does not support the compressed file reading");
    }

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Set excel_engine = EasyExcel in the source config, which streams rows instead of loading the whole entry.
  2. Increase the POI archive-entry size limit option to a value above the largest expected entry size (or disable the limit if allowed).
  3. Recompress the archive with a smaller/uncompressed Excel entry or split the workbook into smaller files.

Example fix

// before
excel_engine = POI
// after
excel_engine = EasyExcel
Defensive patterns

Strategy: validation

Validate before calling

if (engine == "POI" && entrySizeBytes > poiLimitBytes) {
    throw new IllegalArgumentException("Entry " + entryName + " exceeds POI limit " + poiLimitBytes + "; switch to EasyExcel or raise the limit");
}

Try / catch

try {
    readArchive(path);
} catch (FileConnectorException e) {
    if (e.getSeaTunnelApiErrorCode() == CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION) {
        // fall back to EasyExcel engine or raise limit and retry
    }
}

Prevention

When it happens

Trigger: Reading an archive (e.g. .zip/.tar.gz) containing an .xlsx/.xls entry whose uncompressed size is greater than the configured max-bytes limit (limit disabled only if maxBytes <= 0) while excel_engine is POI. Raised from resolveArchiveCompressedInputStream via assertArchiveEntrySize.

Common situations: Users point a file source at a zip containing a large Excel workbook; the limit was introduced to prevent OOM from zip-bomb archives, so jobs that worked with small files fail on a big spreadsheet.

Understand the failure class

Background: "File too large" / "file size exceeds limit" errors: why libraries cap file sizes and how to fix them — this error's family across 46 libraries.

Related errors


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