apache/cassandra · error · IllegalArgumentException

Invalid values for %s: '%s' do not parse as valid %s propert

Error message

Invalid values for %s: '%s' do not parse as valid %s properties

What it means

Table-property guardrail lists may only contain valid CQL table attribute keywords. validateTableProperties() computes the set difference between the configured (lowercased) properties and TableAttributes.allKeywords(); any unrecognized names cause IllegalArgumentException via invalidValueMessage(..., "table").

Source

Thrown at src/java/org/apache/cassandra/config/GuardrailsOptions.java:1630

        if (warn == null || fail == null)
            return;

        if (fail.toBytes() < warn.toBytes())
            throw new IllegalArgumentException(format("The warn threshold %s for %s_warn_threshold should be lower " +
                                                      "than the fail threshold %s", warn, name, fail));
    }

    private static Set<String> validateTableProperties(Set<String> properties, String name)
    {
        if (properties == null)
            throw new IllegalArgumentException(format("Invalid value for %s: null is not allowed", name));

        Set<String> lowerCaseProperties = properties.stream().map(String::toLowerCase).collect(toSet());

        Set<String> diff = Sets.difference(lowerCaseProperties, TableAttributes.allKeywords());

        if (!diff.isEmpty())
            throw new IllegalArgumentException(invalidValueMessage(name, diff, "table"));

        return lowerCaseProperties;
    }

    private static Set<String> validateKeyspaceProperties(Set<String> properties, String name)
    {
        if (properties == null)
            throw new IllegalArgumentException(format("Invalid value for %s: null is not allowed", name));

        Set<String> lowerCaseProperties = properties.stream().map(LocalizeString::toLowerCaseLocalized).collect(toSet());

        for (String requiredKeyword : KeyspaceAttributes.requiredKeywords())
        {
            if (lowerCaseProperties.contains(requiredKeyword))
                throw new IllegalArgumentException(format("Invalid value for %s: '%s' is a required keyspace property", name, requiredKeyword));
        }

        Set<String> diff = Sets.difference(lowerCaseProperties, KeyspaceAttributes.allKeywords());

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Remove or correct the offending names so only valid table attribute keywords (per TableAttributes.allKeywords()) remain.
  2. Check the error's listed invalid values and compare against SHOW CREATE TABLE / CQL table options documentation.
  3. Replace case-sensitive attempts with the canonical lowercase keyword names (validation lowercases input itself).

Example fix

// before
table_properties_disallowed:
  - comment
  - default_time_to_live
  - not_a_real_option
// after
table_properties_disallowed:
  - comment
  - default_time_to_live
Defensive patterns

Strategy: validation

Validate before calling

Set<String> invalid = Sets.difference(
    properties.stream().map(String::toLowerCase).collect(java.util.stream.Collectors.toSet()),
    org.apache.cassandra.cql3.statements.TableAttributes.allKeywords());
if (!invalid.isEmpty()) throw new IllegalArgumentException("Unknown table properties: " + invalid);

Try / catch

try { validateTableProperties(cfg.table_properties_disallowed); } catch (IllegalArgumentException e) { log.error("Invalid table properties: {}", e.getMessage()); throw e; }

Prevention

When it happens

Trigger: cassandra.yaml entries like table_properties_disallowed: [comment, bloom_filter_fp_chance, not_a_real_option] where 'not_a_real_option' is not a table attribute keyword; also triggered by camelCase/misremembered property names after lowercasing.

Common situations: Typo'd or deprecated CQL table properties in yaml; copying property names from a different CQL version where keywords changed; accidentally listing table IDs or column names instead of attribute keywords.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/0d2f8d458e09d974. Report an issue: GitHub.