apache/cassandra · error · IllegalArgumentException
Table not specified.
Error message
Table not specified.
What it means
This is the same validate() guard as the keyspace check, but for the table field of the dictionary descriptor. A compression dictionary is per-table, so a null table name makes the descriptor unusable and is rejected before it is exported to TabularData.
Source
Thrown at src/java/org/apache/cassandra/db/compression/CompressionDictionaryDetailsTabularData.java:290
*
* <ul>
* <li>keyspace, table and table id are not null</li>
* <li>dict id is lower than 0</li>
* <li>dict is not null nor empty</li>
* <li>dict length is less than or equal to 1MiB</li>
* <li>kind is not null and there is such {@link org.apache.cassandra.db.compression.CompressionDictionary.Kind}</li>
* <li>dictLength is bigger than 0</li>
* <li>dictLength has to be equal to dict's length</li>
* <li>dictChecksum has to be equal to checksum computed as part of this method</li>
* <li>creation date is not null</li>
* </ul>
*/
private void validate()
{
if (keyspace == null)
throw new IllegalArgumentException("Keyspace not specified.");
if (table == null)
throw new IllegalArgumentException("Table not specified.");
if (tableId == null)
throw new IllegalArgumentException("Table id not specified.");
if (dictId <= 0)
throw new IllegalArgumentException("Provided dictionary id must be positive but it is '" + dictId + "'.");
if (dict == null || dict.length == 0)
throw new IllegalArgumentException("Provided dictionary byte array is null or empty.");
if (kind == null)
throw new IllegalArgumentException("Provided kind is null.");
CompressionDictionary.Kind dictionaryKind;
try
{
dictionaryKind = CompressionDictionary.Kind.valueOf(kind);
}
catch (IllegalArgumentException ex)
{
throw new IllegalArgumentException("There is no such dictionary kind like '" + kind + "'. Available kinds: " + Arrays.asList(CompressionDictionary.Kind.values()));View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Provide the fully-qualified table name on the dictionary data object before validation
- Verify the source CompositeData contains a non-null TABLE value
- Fix the constructor call so the table argument is not null
Example fix
// before
new CompressionDictionaryDataObject("ks", null, tableId, ...);
// after
new CompressionDictionaryDataObject("ks", "tbl", tableId, ...); Defensive patterns
Strategy: validation
Validate before calling
if (obj.table == null || obj.table.isEmpty()) throw new IllegalArgumentException("table must be set before creating CompressionDictionaryDataObject"); Type guard
boolean hasTable(CompressionDictionaryDataObject o) { return o.table != null && !o.table.isEmpty(); } Try / catch
try { tabularData.fromDataObject(obj); } catch (IllegalArgumentException e) { if (e.getMessage().contains("Table not specified")) { /* set table and retry */ } else throw e; } Prevention
- Resolve the table name in the same place the keyspace is resolved so neither is missed
- Validate the 'ks.tbl' split produces both components non-empty
- Keep descriptor construction in one helper that requires both name fields
When it happens
Trigger: Building a CompressionDictionaryDataObject with table == null — e.g. omitting the table name when programmatically importing a dictionary, or a CompositeData missing the TABLE item.
Common situations: Import tooling that fills keyspace but forgets table; reflection/serialization paths that skip null fields when constructing the data object.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Keyspace not specified.
- Table id not specified.
- Provided dictionary id must be positive but it is '<dictId>'
- Provided dictionary byte array is null or empty.
- Provided kind is null.
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/bad38de94d595db0.
Report an issue: GitHub.