apache/cassandra · error · ConfigurationException
%s.validateOptions() threw an error: %s %s
Error message
%s.validateOptions() threw an error: %s %s
What it means
CompactionParams.validate() wraps any unexpected Throwable thrown by the strategy's reflective validateOptions() call into a ConfigurationException stating that <class>.validateOptions() threw an error, including the cause's class name and message. It signals a bug or unhandled condition inside the compaction strategy class itself, not merely a bad option key.
Source
Thrown at src/java/org/apache/cassandra/schema/CompactionParams.java:219
unknownOptions.keySet(),
klass.getSimpleName()));
}
}
catch (NoSuchMethodException e)
{
logger.warn("Compaction strategy {} does not have a static validateOptions method. Validation ignored",
klass.getName());
}
catch (InvocationTargetException e)
{
if (e.getTargetException() instanceof ConfigurationException)
throw (ConfigurationException) e.getTargetException();
Throwable cause = e.getCause() == null
? e
: e.getCause();
throw new ConfigurationException(format("%s.validateOptions() threw an error: %s %s",
klass.getName(),
cause.getClass().getName(),
cause.getMessage()),
e);
}
catch (IllegalAccessException e)
{
throw new ConfigurationException("Cannot access method validateOptions in " + klass.getName(), e);
}
String minThreshold = options.get(Option.MIN_THRESHOLD.toString());
if (minThreshold != null && !StringUtils.isNumeric(minThreshold))
{
throw new ConfigurationException(format("Invalid value %s for '%s' compaction sub-option - must be an integer",
minThreshold,
Option.MIN_THRESHOLD));
}
View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Read the cause class/message embedded in the error (e.g. NumberFormatException: For input string: "abc") and fix the offending option value.
- Ensure numeric sub-options like min_threshold/max_threshold are valid integers.
- Null-check option values in config tooling before applying the ALTER.
- If the crash is a strategy bug, upgrade to a Cassandra version with the fix or file a JIRA.
Example fix
// before
ALTER TABLE t WITH compaction = {'class':'SizeTieredCompactionStrategy','min_threshold':'four'};
// after
ALTER TABLE t WITH compaction = {'class':'SizeTieredCompactionStrategy','min_threshold':'4'}; Defensive patterns
Strategy: try-catch
Validate before calling
opts.forEach((k, v) -> { if (v == null) throw new IllegalArgumentException("null value for " + k); }); Try / catch
try { applyCompaction(opts); } catch (ConfigurationException e) {
logger.error("validateOptions failed: {}", e.getMessage(), e);
// inspect cause class (e.g. NumberFormatException) and fix the option value
} Prevention
- Pass valid integers for min_threshold/max_threshold.
- Never send null values in the compaction map.
- Pin Cassandra versions with known-fixed strategy validation bugs.
When it happens
Trigger: Calling ALTER TABLE ... WITH compaction = {'class':'...', ...} where the strategy's static validateOptions(Map) throws at runtime — e.g. NumberFormatException parsing a numeric option like min/max_threshold, or NPE on a null option value.
Common situations: Passing non-integer values for min_threshold/max_threshold; null values in the compaction map; strategy classes with version-specific bugs (e.g. older TWCS validating window options defensively).
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
- Properties specified %s are not understood by %s
- concurrent_compactors should be strictly greater than 0, but
- Could not set new local compaction strategy: <cause message>
- %s is not a parsable int (base10) for %s
- %s must not be negative, but was %d
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/a4f6c60efdf31b3b.
Report an issue: GitHub.