apache/seatunnel · error · java.lang.IllegalArgumentException
Condition operator must not be null
Error message
Condition operator must not be null
What it means
ExcelReadStrategy.getPoiExcelMaxFileSize reads the poi_excel_max_file_size option (falling back to its default) and validates it is strictly greater than 0. A non-positive value would make the POI file-size guard meaningless, so it throws FileConnectorException with ILLEGAL_ARGUMENT before any file is read.
Source
Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/Condition.java:58
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()));
}
if (operator == ConditionOperator.EXTENSION && extension == null) {
throw new IllegalArgumentException(
"Operator EXTENSION requires a non-null ConditionExtension");View on GitHub (pinned to cf67b549a7)
Solutions
- Set poi_excel_max_file_size to a positive byte value, e.g. 104857600 for 100MB.
- Remove the option to use the default limit instead of setting 0.
- To effectively bypass the limit for huge POI files, set a very large positive value and size worker heap accordingly.
Example fix
// before poi_excel_max_file_size = 0 // after poi_excel_max_file_size = 104857600
Defensive patterns
Strategy: validation
Validate before calling
java
if (pluginConfig.hasPath("poi_excel_max_file_size")
&& pluginConfig.getLong("poi_excel_max_file_size") <= 0) {
throw new IllegalArgumentException("poi_excel_max_file_size must be > 0 (bytes)");
} Try / catch
java
try {
reader.readProcess(split);
} catch (FileConnectorException e) {
if (e.getMessage().contains("must be greater than 0")) {
LOG.error("Fix poi_excel_max_file_size — it is a byte size, must be positive", e);
}
} Prevention
- Never use 0 or negative values to 'disable' the limit — use a large positive value or switch engines
- Treat poi_excel_max_file_size as bytes in all config templates
- Add config linting that asserts positivity for size options
When it happens
Trigger: getPoiExcelMaxFileSize (called from maxFileSize/maxBytesForEntry and the POI read path) encounters poi_excel_max_file_size <= 0 in plugin_config, e.g. 0, -1, or a negative expression result.
Common situations: Trying to 'disable' the limit by setting it to 0; templated configs where the byte value is computed and can go negative; misunderstanding that the option is a ratio or flag rather than a byte size.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Option not be null.
- prepare method is not supported
- Json parsing exception.
- Condition option must not be null
- Operator EXTENSION requires a non-null ConditionExtension
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/3b627b1f8740d1ad.
Report an issue: GitHub.