apache/seatunnel · error · IllegalArgumentException
${option} must be greater than zero
Error message
${option} must be greater than zero What it means
DeepLakeSinkConfig.requirePositive validates numeric options (batch_size, connect_timeout_ms, socket_timeout_ms) and throws IllegalArgumentException('<option> must be greater than zero') when the value is <= 0, guaranteeing the HTTP client and batching logic receive sane parameters.
Source
Thrown at seatunnel-connectors-v2/connector-deeplake/src/main/java/org/apache/seatunnel/connectors/seatunnel/deeplake/config/DeepLakeSinkConfig.java:84
if (value == null) {
return null;
}
int end = value.length();
while (end > 0 && value.charAt(end - 1) == '/') {
end--;
}
return value.substring(0, end);
}
private static void requireNonBlank(String value, String option) {
if (value == null || value.trim().isEmpty()) {
throw new IllegalArgumentException(option + " must not be blank");
}
}
private static void requirePositive(int value, String option) {
if (value <= 0) {
throw new IllegalArgumentException(option + " must be greater than zero");
}
}
public String getApiUrl() {
return apiUrl;
}
public String getApiKey() {
return apiKey;
}
public String getOrgId() {
return orgId;
}
public String getWorkspace() {
return workspace;
}View on GitHub (pinned to cf67b549a7)
Solutions
- Set the reported option to a positive integer (e.g. batch_size = 100, connect_timeout_ms = 60000)
- Remove the option to fall back to the documented default instead of forcing 0
- Fix templated config expressions that evaluate to zero
Example fix
// before socket_timeout_ms = 0 // after socket_timeout_ms = 120000
Defensive patterns
Strategy: validation
Validate before calling
for (String k : java.util.List.of("batch_size","connect_timeout_ms","socket_timeout_ms")) {
int v = config.getInt(k, 1);
if (v <= 0) throw new IllegalStateException(k + " must be > 0");
} Try / catch
try { new DeepLakeSinkConfig(options); } catch (IllegalArgumentException e) { if (e.getMessage().contains("must be greater than zero")) log.error("Bad numeric option: {}", e.getMessage()); throw e; } Prevention
- Keep numeric options positive; omit them to use defaults
- Watch for 0-vs-default confusion in timeout settings
- Sanity-check templated arithmetic in generated configs
When it happens
Trigger: Configuring batch_size, connect_timeout_ms, or socket_timeout_ms with 0 or a negative number in the Deep Lake sink options.
Common situations: Setting a timeout to 0 thinking it means 'no timeout'; templated config arithmetic evaluating to 0; unit mistakes (seconds vs ms) producing tiny or negative values.
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} must not be blank
- Schema config can not be empty
- Unknown format type:
- Option '${option}' cannot be blank
- Option '${valuesAndOptions[index + 1]}' is not valid for the
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/f9d84de011a971b1.
Report an issue: GitHub.