Activiti/Activiti · error · PropertyNotFoundException
Cannot find property
Error message
Cannot find property {property} What it means
RootPropertyResolver resolves top-level identifiers in JUEL expressions against a map of root properties. When resolve() marks the property as handled but no property with that name exists (and no null-property was registered), getValue throws PropertyNotFoundException.
Solutions
- Register the missing property via setProperty("name", value) or the resolver constructor map before evaluating.
- Correct the property name in the EL expression to match a registered root property.
- If lookups may be optional, wrap resolution logic so undefined properties return null instead of resolving through this resolver.
Example fix
// before
resolver.getValue(ctx, null, "customer"); // PropertyNotFoundException
// after
resolver.setProperty("customer", customerObj);
Object v = resolver.getValue(ctx, null, "customer"); Defensive patterns
Strategy: validation
Validate before calling
if (!resolver.isProperty(propertyName)) { throw new IllegalArgumentException("Unknown root property: " + propertyName); } Try / catch
try { return resolver.getValue(ctx, null, name); } catch (PropertyNotFoundException e) { log.warn("Missing root property {}", name); return null; } Prevention
- Register all root properties before evaluating expressions.
- Keep property names in constants shared between registration and expressions.
- Validate expression identifiers against the resolver in tests.
When it happens
Trigger: Evaluating an EL expression like ${unknown} where 'unknown' is not a registered root property; the resolver accepted the (null base, property) resolution but isProperty((String) property) returned false.
Common situations: Typos in property names inside process expressions; a root property registered under a different name or removed; expression evaluation in a fresh resolver that never had the property set.
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.identifier.method.notamethod
- error.property.base.null
- error.property.property.notfound
- error.value.set.rvalue
- Cannot coerce ' ' of to (incompatible type)
AI-assisted analysis of Activiti/Activiti@56435b1a97 (2026-09-09).
Data as JSON: /api/errors/2999c82e9fef2302.
Report an issue: GitHub.
Appendix: source
Thrown at activiti-core-common/activiti-juel-jakarta/src/main/java/org/activiti/core/el/juel/util/RootPropertyResolver.java:79
context.setPropertyResolved(isResolvable(base) && property instanceof String);
return context.isPropertyResolved();
}
@Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
return isResolvable(context) ? String.class : null;
}
@Override
public Class<?> getType(ELContext context, Object base, Object property) {
return resolve(context, base, property) ? Object.class : null;
}
@Override
public Object getValue(ELContext context, Object base, Object property) {
if (resolve(context, base, property)) {
if (!isProperty((String) property)) {
throw new PropertyNotFoundException("Cannot find property " + property);
}
return getProperty((String) property);
}
return null;
}
@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
return resolve(context, base, property) ? readOnly : false;
}
@Override
public void setValue(ELContext context, Object base, Object property, Object value)
throws PropertyNotWritableException {
if (resolve(context, base, property)) {
if (readOnly) {
throw new PropertyNotWritableException("Resolver is read only!");
}View on GitHub (pinned to 56435b1a97)