apache/seatunnel · error · java.lang.IllegalArgumentException
Condition option must not be null
Error message
Condition option must not be null
What it means
ExcelReadStrategy.assertPoiFileSize guards the POI read path against out-of-memory failures: it compares the split's file size (from split.getLength() or the Hadoop FileSystem file status) against poi_excel_max_file_size and throws FileConnectorException with UNSUPPORTED_OPERATION when the file is larger. The message tells you to switch to the streaming EasyExcel engine or raise the limit.
Source
Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/Condition.java:55
private Condition<?> next = null;
Condition(Option<T> option, T expectValue) {
this(option, ConditionOperator.EQUAL, expectValue, null, null);
}
Condition(
Option<T> option, ConditionOperator operator, T expectValue, Option<?> compareOption) {
this(option, operator, expectValue, compareOption, null);
}
Condition(
Option<T> option,
ConditionOperator operator,
T expectValue,
Option<?> compareOption,
ConditionExtension<T> extension) {
if (option == null) {
throw new IllegalArgumentException("Condition option must not be null");
}
if (operator == null) {
throw new IllegalArgumentException("Condition operator must not be null");
}
if (operator.getSource() == ConditionOperator.Source.FIELD && compareOption == null) {
throw new IllegalArgumentException(
String.format(
"Operator %s requires a compareOption (cross-field comparison), but compareOption is null",
operator.name()));
}
if (operator.getArity() == ConditionOperator.Arity.BINARY
&& operator.getSource() == ConditionOperator.Source.LITERAL
&& expectValue == null) {
throw new IllegalArgumentException(
String.format(
"Operator %s requires an expectValue, but expectValue is null",
operator.name()));
}View on GitHub (pinned to cf67b549a7)
Solutions
- Set excel_engine = EasyExcel so the file is read in streaming mode without the POI size limit.
- Increase poi_excel_max_file_size (bytes) to cover the actual file size if POI features (formulas via evaluator) are required — ensure the worker has enough heap.
- Split or archive the oversized workbook into smaller files below the limit.
Example fix
// before excel_engine = "POI" // poi_excel_max_file_size = 104857600 // after excel_engine = "EasyExcel" // or raise poi_excel_max_file_size = 1073741824
Defensive patterns
Strategy: fallback
Validate before calling
java
long limit = pluginConfig.hasPath("poi_excel_max_file_size")
? pluginConfig.getLong("poi_excel_max_file_size")
: FileBaseSourceOptions.POI_EXCEL_MAX_FILE_SIZE.defaultValue();
long len = fileSystem.getFileStatus(path).getLen();
boolean usePoi = len <= limit; // else configure excel_engine = EasyExcel
Try / catch
java
try {
reader.readProcess(split);
} catch (FileConnectorException e) {
if (e.getMessage().contains("larger than POI limit")) {
LOG.error("File {} exceeds POI limit — switch excel_engine=EasyExcel or raise poi_excel_max_file_size", e);
}
} Prevention
- Check the size of the largest expected Excel file before choosing the engine
- Prefer EasyExcel for large or unbounded workbooks
- Set poi_excel_max_file_size deliberately based on worker heap, not arbitrarily
When it happens
Trigger: readByPoi calls assertPoiFileSize and the target Excel file's byte size exceeds the configured poi_excel_max_file_size (or its default) while excel_engine is POI.
Common situations: Reading multi-hundred-MB .xlsx exports (data warehouse dumps) with the default POI engine; a limit configured for small files reused on a job that picks up much larger files; team policy keeps POI for formula support but the data volume grew.
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
- Json parsing exception.
- Option not be null.
- Condition operator must not be null
- Operator EXTENSION requires a non-null ConditionExtension
- prepare method is not supported
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/f103cd3973b1d56f.
Report an issue: GitHub.