apache/cassandra · error · org.apache.cassandra.config.YAMLException
No readable property '%s' on class: %s
Error message
No readable property '%s' on class: %s
What it means
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.
Source
Thrown at src/java/org/apache/cassandra/config/DefaultLoader.java:104
/**
* .get() acts differently than .set() and doesn't do a good job showing the cause of the failure, this
* class rewrites to make the errors easier to reason with.
*/
private static class MethodPropertyPlus extends MethodProperty
{
private final Method readMethod;
public MethodPropertyPlus(PropertyDescriptor property)
{
super(property);
this.readMethod = property.getReadMethod();
}
@Override
public Object get(Object object)
{
if (!isReadable())
throw new YAMLException("No readable property '" + getName() + "' on class: " + object.getClass().getName());
try
{
return readMethod.invoke(object);
}
catch (IllegalAccessException e)
{
throw new YAMLException("Unable to find getter for property '" + getName() + "' on class " + object.getClass().getName(), e);
}
catch (InvocationTargetException e)
{
throw new YAMLException("Failed calling getter for property '" + getName() + "' on class " + object.getClass().getName(), e.getCause());
}
}
}
}
View on GitHub (pinned to 88fd0f6a0e)
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).
Example fix
// before (cassandra.yaml) old_field: 42 // after (cassandra.yaml) # key removed or renamed to the current schema name new_field: 42
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-validate yaml keys against the Config schema before loading: // for each yaml key, assert a matching readable property exists on the target class
Type guard
null
Try / catch
try { loader.load(yamlStream); } catch (YAMLException e) { log.error("unreadable config property: " + e.getMessage(), e); } Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Unable to find getter for property '%s' on class %s
- Failed to instantiate %s
- Invalid data rate: ${value} Accepted units: MiB/s, KiB/s, B/
- Invalid data rate: ${value}. It shouldn't be more than ${max
- Invalid data storage: ${value} Accepted units:${acceptedUnit
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/3ffd44b1e1af9d0c.
Report an issue: GitHub.