{"record":{"id":"2c30cdb8d69faef3","repo":"apache/seatunnel","slug":"commonerrorcodedeprecated-unsupported-operation","errorCode":"CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION","errorMessage":"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.","messagePattern":"Archived entry \\[(.+?)\\] is %,d bytes, larger than POI limit %,d bytes\\. Please set excel_engine = EasyExcel, or increase the limit if POI is required\\.","errorType":"error_code","errorClass":"FileConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/AbstractReadStrategy.java","lineNumber":565,"sourceCode":"                        output,\n                        hadoopFileSystemProxy.getInputStream(path),\n                        partitionsMap,\n                        path);\n        }\n    }\n\n    /**\n     * Rejects an archive entry whose declared size exceeds the configured POI limit.\n     *\n     * @param entryName archive entry name used in the error message\n     * @param entrySize declared uncompressed entry size in bytes\n     * @param maxBytes maximum allowed size in bytes; non-positive values disable the limit\n     */\n    private void assertArchiveEntrySize(String entryName, long entrySize, long maxBytes) {\n        if (maxBytes <= 0 || entrySize <= 0 || entrySize <= maxBytes) {\n            return;\n        }\n        throw new FileConnectorException(\n                CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION,\n                String.format(\n                        \"Archived entry [%s] is %,d bytes, larger than POI limit %,d bytes. \"\n                                + \"Please set excel_engine = EasyExcel, or increase the limit if POI is required.\",\n                        entryName, entrySize, maxBytes));\n    }\n\n    protected void readProcess(\n            FileSourceSplit split,\n            Collector<SeaTunnelRow> output,\n            InputStream inputStream,\n            Map<String, String> partitionsMap,\n            String currentFileName)\n            throws IOException {\n        throw new UnsupportedOperationException(\n                \"The file does not support the compressed file reading\");\n    }\n","sourceCodeStart":547,"sourceCodeEnd":583,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/AbstractReadStrategy.java#L547-L583","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Set excel_engine = EasyExcel in the source config, which streams rows instead of loading the whole entry.","Increase the POI archive-entry size limit option to a value above the largest expected entry size (or disable the limit if allowed).","Recompress the archive with a smaller/uncompressed Excel entry or split the workbook into smaller files."],"exampleFix":"// before\nexcel_engine = POI\n// after\nexcel_engine = EasyExcel","handlingStrategy":"validation","validationCode":"if (engine == \"POI\" && entrySizeBytes > poiLimitBytes) {\n    throw new IllegalArgumentException(\"Entry \" + entryName + \" exceeds POI limit \" + poiLimitBytes + \"; switch to EasyExcel or raise the limit\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    readArchive(path);\n} catch (FileConnectorException e) {\n    if (e.getSeaTunnelApiErrorCode() == CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION) {\n        // fall back to EasyExcel engine or raise limit and retry\n    }\n}","preventionTips":["Prefer excel_engine = EasyExcel for files read from archives","Know your largest workbook size and set the POI limit above it","Treat large archives as suspicious (zip bombs) and pre-scan entry sizes"],"tags":["file","excel","archive","size-limit"],"backgroundTag":"file-size-limit-exceeded","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}