pentaho/pentaho-kettle · error · RuntimeException
Property not found
Error message
Property not found
What it means
BeanInjector.getObject looks up the named metadata-injection property in BeanInjectionInfo; if the property name is not a registered injection property of the target class it throws RuntimeException('Property not found'). Used mainly by tests/debug code to read a field value by injection property name.
Solutions
- List valid names via new BeanInjectionInfo(rootClass).getProperties().keySet() and use one exactly
- Check the target field has an @Injection annotation with the name being requested
- Ensure the BeanInjector was built for the same class as the root object
Example fix
// before injector.getObject(meta, "feildName"); // after injector.getObject(meta, "fieldName"); // exact @Injection name
Defensive patterns
Strategy: validation
Validate before calling
Set<String> valid = new BeanInjectionInfo(root.getClass()).getProperties().keySet(); if (!valid.contains(propName)) throw new IllegalArgumentException(propName + " not in " + valid);
Try / catch
try { return injector.getObject(meta, propName); }
catch (RuntimeException e) { log.warn("Unknown injection property " + propName); return null; } Prevention
- Generate property names from BeanInjectionInfo, never hard-code strings
- Keep @Injection names in sync with any plugin upgrade notes
When it happens
Trigger: Calling beanInjector.getObject(root, propName) where propName is not a key in info.getProperties() — i.e. the name is misspelled, not annotated with @Injection, or belongs to a different class than the BeanInjector was constructed for.
Common situations: Passing a getter-style or display name instead of the injection name; target plugin class updated and the property removed/renamed; using the wrong BeanInjectionInfo for the object.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- Error inject property
- No setter defined for
- Property ' ' has more than one array in path for injection…
- Property ' ' not found for injection to
- Unexpected error occurred while injecting metadata
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/a7e3b0863a671a60.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/core/injection/bean/BeanInjector.java:49
import java.util.stream.Collectors;
import static com.google.common.collect.Lists.newLinkedList;
import static java.util.Objects.requireNonNull;
/**
* Engine for get/set metadata injection properties from bean.
*/
public class BeanInjector {
private final BeanInjectionInfo info;
public BeanInjector( BeanInjectionInfo info ) {
this.info = info;
}
public Object getObject( Object root, String propName ) throws Exception {
BeanInjectionInfo.Property prop = info.getProperties().get( propName );
if ( prop == null ) {
throw new RuntimeException( "Property not found" );
}
BeanLevelInfo beanLevelInfo = prop.path.get( 1 );
return beanLevelInfo.field.get( root );
}
/**
* Retrieves the raw prop value from root object.
* <p>
* The similar {@link #getProperty(Object, String)} method (also in this class )should be
* revisited and possibly eliminated. That version attempts to retrieve indexed prop
* vals from lists/arrays, but doesn't provide a way to retrieve the list or array objects
* themselves.
*/
public Object getPropVal( Object root, String propName ) {
Queue<BeanLevelInfo> beanInfos =
newLinkedList( Optional.ofNullable( info.getProperties().get( propName ) )
.orElseThrow( () -> new IllegalArgumentException( "Property not found: " + propName ) )
.path );View on GitHub (pinned to f3058517a1)