apache/cassandra · error · ConfigurationException
Unknown compression options () since no compression class fo
Error message
Unknown compression options () since no compression class found
What it means
In createCompressor, if no compression class was resolved (compressorClass == null) yet leftover compression options remain, Cassandra throws ConfigurationException 'Unknown compression options (...) since no compression class found' — the options cannot be interpreted without a class.
Source
Thrown at src/java/org/apache/cassandra/schema/CompressionParams.java:329
className = className.contains(".") ? className : "org.apache.cassandra.io.compress." + className;
try
{
return FBUtilities.classForNameWithoutInitialization(className, "compression", ICompressor.class);
}
catch (ConfigurationException e)
{
if (e.getCause() instanceof ClassNotFoundException || e.getCause() instanceof NoClassDefFoundError)
throw new ConfigurationException("Could not create Compression for type " + className, e);
throw e;
}
}
private static ICompressor createCompressor(Class<? extends ICompressor> compressorClass, Map<String, String> compressionOptions) throws ConfigurationException
{
if (compressorClass == null)
{
if (!compressionOptions.isEmpty())
throw new ConfigurationException("Unknown compression options (" + compressionOptions.keySet() + ") since no compression class found");
return null;
}
return registry.getCompressor(compressorClass, compressionOptions);
}
public static ICompressor createCompressor(ParameterizedClass compression) throws ConfigurationException
{
return createCompressor(parseCompressorClass(compression.class_name), copyOptions(compression.parameters));
}
private static Map<String, String> copyOptions(Map<? extends CharSequence, ? extends CharSequence> co)
{
if (co == null || co.isEmpty())
return Collections.emptyMap();
Map<String, String> compressionOptions = new HashMap<>();
for (Map.Entry<? extends CharSequence, ? extends CharSequence> entry : co.entrySet())View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Ensure the map contains a valid 'class' key naming a known ICompressor implementation
- Remove unknown/stale keys from the compression options map
- Fix key-name typos so the class is actually recognized
Example fix
// before
compression = {'compression_class': 'LZ4Compressor', 'chunk_length_in_kb': '16'}
// after
compression = {'class': 'LZ4Compressor', 'chunk_length_in_kb': '16'} Defensive patterns
Strategy: validation
Validate before calling
if (!opts.containsKey("class") && opts.size() > 0)
throw new IllegalArgumentException("Compression options given without a 'class' key: " + opts.keySet()); Try / catch
try { compressionParams = CompressionParams.fromMap(opts); } catch (ConfigurationException e) { if (e.getMessage().contains("since no compression class found")) { /* fix class key name */ } throw e; } Prevention
- Check the exact key name is 'class' (not class_name/compression_class)
- Strip unknown keys from compression maps before submission
- Keep a whitelist of allowed compression sub-options in tooling
When it happens
Trigger: A compression options map containing unrecognized keys but no resolvable 'class'; calling createCompressor with a null class and non-empty compressionOptions.
Common situations: Misspelled 'class' key (e.g. 'compression_class') so the class lookup yields null while other keys remain; merged maps from configs that dropped the class entry.
Understand the failure class
Background: "Must pass :limit option" / "Missing required option" — required option errors explained — this error's family across 41 libraries.
Related errors
- compressed_read_ahead_buffer_size must be at least 256KiB (s
- <ConfigurationException message>
- Load CIDR groups cache operation not supported by %s
- Unsupported parameter '%s' for %s, supported parameters are
- JAAS login configuration missing for JMX authenticator setup
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/a899e458274b01af.
Report an issue: GitHub.