theonedev/onedev · error · ExplicitException
Getter not found for property: ${name}
Error message
Getter not found for property: ${name} What it means
OneDev's patched Hibernate Validator resolves property values reflectively when evaluating a ShowCondition. It first looks up a getter by property name, then falls back to matching getters by their editable display name. If neither lookup succeeds, it throws this ExplicitException because the referenced property cannot be resolved on the bean class.
Source
Thrown at server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java:1379
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
throw new ExplicitException("Error invoking getter for property: " + dependsOn.property(), e);
}
}
var showCondition = getter.getAnnotation(ShowCondition.class);
if (showCondition != null) {
EditContext.push(new EditContext() {
@Override
public Object getInputValue(String name) {
var getter = BeanUtils.findGetter(bean.getClass(), name);
if (getter == null) {
for (var eachGetter: BeanUtils.findGetters(bean.getClass())) {
if (EditableUtils.getDisplayName(eachGetter).equals(name)) {
getter = eachGetter;
break;
}
}
if (getter == null)
throw new ExplicitException("Getter not found for property: " + name);
}
try {
return getter.invoke(bean);
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
throw new ExplicitException("Error invoking getter for property: " + name, e);
}
}
});
try {
if (!(boolean)ReflectionUtils.invokeStaticMethod(bean.getClass(), showCondition.value()))
return false;
} finally {
EditContext.pop();
}
}
}
// check if this validation context is qualified to validate the current meta constraint.View on GitHub (pinned to d44925c47c)
Solutions
- Check the property name referenced in the @ShowCondition property list and correct it to an existing getter name on the bean class.
- Add or fix the getter (getX()/isX()) for the referenced property on the bean.
- If matching by display name, ensure the @Editable display name exactly equals the referenced name.
- Rebuild the module so the edited bean class is hot-reloaded by the dev server.
Example fix
// before @ShowCondition(property="enableTlsEnabled") // after @ShowCondition(property="enableTls") // matches existing getter isEnableTls()
Defensive patterns
Strategy: validation
Validate before calling
// Before building the bean/form, verify every @ShowCondition-referenced name has a getter:
for (Method m : beanClass.getDeclaredMethods()) {
ShowCondition sc = m.getAnnotation(ShowCondition.class);
if (sc != null)
for (String name : sc.property())
if (BeanUtils.findGetter(beanClass, name) == null)
throw new IllegalStateException("ShowCondition references unknown property: " + name);
} Type guard
boolean hasGetter(Class<?> cls, String name) { return BeanUtils.findGetter(cls, name) != null; } Prevention
- Keep @ShowCondition property lists in sync whenever renaming fields
- Always back editable properties with standard getX()/isX() getters
- Write a unit test reflecting over form beans to verify ShowCondition references
When it happens
Trigger: The name passed to EditContext.getInputValue (referenced from a @ShowCondition-annotated property) matches no getter on the bean class, and no getter's EditableUtils display name equals it — typically a typo or a renamed/removed property in the referenced property list of a ShowCondition.
Common situations: Renaming a bean property without updating the property name referenced in @ShowCondition; using a field with no standard getX()/isX() getter; referencing a property by its label when the label text differs in case or whitespace from the display name.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Error invoking getter for property: ${name}
- Unknown collection element class (bean: X, property: Y)
- Property 'type' is reserved (class: X)
- Unsupported type: X
- Error validating imported build spec (import project: %s, im
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/4039aa3d4bebf2c6.
Report an issue: GitHub.