{"record":{"id":"0d2f8d458e09d974","repo":"apache/cassandra","slug":"invalid-values-for-s-s-do-not-parse-as-valid","errorCode":null,"errorMessage":"Invalid values for %s: '%s' do not parse as valid %s properties","messagePattern":"Invalid values for (.+?): '(.+?)' do not parse as valid (.+?) properties","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/GuardrailsOptions.java","lineNumber":1630,"sourceCode":"        if (warn == null || fail == null)\n            return;\n\n        if (fail.toBytes() < warn.toBytes())\n            throw new IllegalArgumentException(format(\"The warn threshold %s for %s_warn_threshold should be lower \" +\n                                                      \"than the fail threshold %s\", warn, name, fail));\n    }\n\n    private static Set<String> validateTableProperties(Set<String> properties, String name)\n    {\n        if (properties == null)\n            throw new IllegalArgumentException(format(\"Invalid value for %s: null is not allowed\", name));\n\n        Set<String> lowerCaseProperties = properties.stream().map(String::toLowerCase).collect(toSet());\n\n        Set<String> diff = Sets.difference(lowerCaseProperties, TableAttributes.allKeywords());\n\n        if (!diff.isEmpty())\n            throw new IllegalArgumentException(invalidValueMessage(name, diff, \"table\"));\n\n        return lowerCaseProperties;\n    }\n\n    private static Set<String> validateKeyspaceProperties(Set<String> properties, String name)\n    {\n        if (properties == null)\n            throw new IllegalArgumentException(format(\"Invalid value for %s: null is not allowed\", name));\n\n        Set<String> lowerCaseProperties = properties.stream().map(LocalizeString::toLowerCaseLocalized).collect(toSet());\n\n        for (String requiredKeyword : KeyspaceAttributes.requiredKeywords())\n        {\n            if (lowerCaseProperties.contains(requiredKeyword))\n                throw new IllegalArgumentException(format(\"Invalid value for %s: '%s' is a required keyspace property\", name, requiredKeyword));\n        }\n\n        Set<String> diff = Sets.difference(lowerCaseProperties, KeyspaceAttributes.allKeywords());","sourceCodeStart":1612,"sourceCodeEnd":1648,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/GuardrailsOptions.java#L1612-L1648","documentation":"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\").","triggerScenarios":"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.","commonSituations":"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.","solutions":["Remove or correct the offending names so only valid table attribute keywords (per TableAttributes.allKeywords()) remain.","Check the error's listed invalid values and compare against SHOW CREATE TABLE / CQL table options documentation.","Replace case-sensitive attempts with the canonical lowercase keyword names (validation lowercases input itself)."],"exampleFix":"// before\ntable_properties_disallowed:\n  - comment\n  - default_time_to_live\n  - not_a_real_option\n// after\ntable_properties_disallowed:\n  - comment\n  - default_time_to_live","handlingStrategy":"validation","validationCode":"Set<String> invalid = Sets.difference(\n    properties.stream().map(String::toLowerCase).collect(java.util.stream.Collectors.toSet()),\n    org.apache.cassandra.cql3.statements.TableAttributes.allKeywords());\nif (!invalid.isEmpty()) throw new IllegalArgumentException(\"Unknown table properties: \" + invalid);","typeGuard":null,"tryCatchPattern":"try { validateTableProperties(cfg.table_properties_disallowed); } catch (IllegalArgumentException e) { log.error(\"Invalid table properties: {}\", e.getMessage()); throw e; }","preventionTips":["Copy table property names from official CQL docs / TableAttributes.allKeywords(), not memory.","Verify names against the Cassandra version in use (keywords change across versions).","Lowercase names yourself in generated configs for consistency."],"tags":["config","guardrails","validation","cassandra"],"backgroundTag":"invalid-enum-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}