apache/cassandra · error · org.apache.cassandra.config.YAMLException
Unable to find getter for property '%s' on class %s
Error message
Unable to find getter for property '%s' on class %s
What it means
The same property accessor throws YAMLException when invoking the read method fails with IllegalAccessException — i.e. the getter exists but is not accessible to the loader (non-public or restricted). The message wraps the original exception as the cause.
Source
Thrown at src/java/org/apache/cassandra/config/DefaultLoader.java:112
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
- Make the property's getter public on the config class.
- Ensure the config class and its getters are in an open/exported package for reflective access.
- Rebuild/redeploy the unmodified upstream Config class instead of a locally patched one.
Example fix
// before
Object getValue() { return value; }
// after
public Object getValue() { return value; } Defensive patterns
Strategy: try-catch
Validate before calling
// check Modifier.isPublic(targetClass.getMethod("get" + cap(prop)).getModifiers()) before loading Type guard
null
Try / catch
try { loader.load(yamlStream); } catch (YAMLException e) { log.error("inaccessible getter while loading config", e.getCause()); } Prevention
- Make all config class getters public.
- Avoid shaded/relocated config classes that break reflection.
- Open packages for reflective access if using JPMS.
- Run config-loading tests against the exact deployed artifact.
When it happens
Trigger: Reading a cassandra.yaml-backed config property whose getter method is not public or is inaccessible under the active classloader/security manager during DefaultLoader property resolution.
Common situations: Custom or patched Config classes with package-private getters; module/JPMS restrictions hiding the getter; shaded/relocated classes breaking reflective access.
Related errors
- No readable 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/08cf1ba9a03f018d.
Report an issue: GitHub.