{"record":{"id":"3ffd44b1e1af9d0c","repo":"apache/cassandra","slug":"no-readable-property-s-on-class-s","errorCode":null,"errorMessage":"No readable property '%s' on class: %s","messagePattern":"No readable property '(.+?)' on class: (.+?)","errorType":"validation","errorClass":"org.apache.cassandra.config.YAMLException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/DefaultLoader.java","lineNumber":104,"sourceCode":"    /**\n     * .get() acts differently than .set() and doesn't do a good job showing the cause of the failure, this\n     * class rewrites to make the errors easier to reason with.\n     */\n    private static class MethodPropertyPlus extends MethodProperty\n    {\n        private final Method readMethod;\n\n        public MethodPropertyPlus(PropertyDescriptor property)\n        {\n            super(property);\n            this.readMethod = property.getReadMethod();\n        }\n\n        @Override\n        public Object get(Object object)\n        {\n            if (!isReadable())\n                throw new YAMLException(\"No readable property '\" + getName() + \"' on class: \" + object.getClass().getName());\n\n            try\n            {\n                return readMethod.invoke(object);\n            }\n            catch (IllegalAccessException e)\n            {\n                throw new YAMLException(\"Unable to find getter for property '\" + getName() + \"' on class \" + object.getClass().getName(), e);\n            }\n            catch (InvocationTargetException e)\n            {\n                throw new YAMLException(\"Failed calling getter for property '\" + getName() + \"' on class \" + object.getClass().getName(), e.getCause());\n            }\n        }\n    }\n}\n","sourceCodeStart":86,"sourceCodeEnd":121,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DefaultLoader.java#L86-L121","documentation":"In DefaultLoader's property accessor, get() refuses to read a property whose readMethod is unavailable (isReadable() false), throwing YAMLException. This happens while mapping cassandra.yaml onto config classes when the YAML references a property that has no accessible getter on the target class.","triggerScenarios":"Loading a cassandra.yaml that contains a key mapping to a property object without a readable (public getter) method, e.g. a removed/renamed config field or a typo'd key mapped onto a class with no matching getter.","commonSituations":"Downgrading Cassandra so the YAML has fields the config class no longer exposes as readable; typos in yaml keys; custom config classes missing getters for declared fields.","solutions":["Remove or correct the offending key in cassandra.yaml so it matches an existing config property.","Add a public getter for the property on the target config class (or make the existing one accessible).","Align the YAML with the config schema of the Cassandra version in use (check for renamed fields after upgrade)."],"exampleFix":"// before (cassandra.yaml)\nold_field: 42\n// after (cassandra.yaml)\n# key removed or renamed to the current schema name\nnew_field: 42","handlingStrategy":"try-catch","validationCode":"// pre-validate yaml keys against the Config schema before loading:\n// for each yaml key, assert a matching readable property exists on the target class","typeGuard":"null","tryCatchPattern":"try { loader.load(yamlStream); } catch (YAMLException e) { log.error(\"unreadable config property: \" + e.getMessage(), e); }","preventionTips":["Keep cassandra.yaml in sync with the running version's config schema.","Remove stale keys after upgrades/downgrades.","Ensure every config class field has a public getter.","Test config loading in CI with the production yaml."],"tags":["yaml","configuration","reflection"],"backgroundTag":"yaml-parse-error","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"}