{"record":{"id":"a7e3b0863a671a60","repo":"pentaho/pentaho-kettle","slug":"property-not-found","errorCode":null,"errorMessage":"Property not found","messagePattern":"Property not found","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/core/injection/bean/BeanInjector.java","lineNumber":49,"sourceCode":"import java.util.stream.Collectors;\n\nimport static com.google.common.collect.Lists.newLinkedList;\nimport static java.util.Objects.requireNonNull;\n\n/**\n * Engine for get/set metadata injection properties from bean.\n */\npublic class BeanInjector {\n  private final BeanInjectionInfo info;\n\n  public BeanInjector( BeanInjectionInfo info ) {\n    this.info = info;\n  }\n\n  public Object getObject( Object root, String propName ) throws Exception {\n    BeanInjectionInfo.Property prop = info.getProperties().get( propName );\n    if ( prop == null ) {\n      throw new RuntimeException( \"Property not found\" );\n    }\n    BeanLevelInfo beanLevelInfo = prop.path.get( 1 );\n    return beanLevelInfo.field.get( root );\n  }\n\n  /**\n   * Retrieves the raw prop value from root object.\n   * <p>\n   * The similar {@link #getProperty(Object, String)} method (also in this class )should be\n   * revisited and possibly eliminated.  That version attempts to retrieve indexed prop\n   * vals from lists/arrays, but doesn't provide a way to retrieve the list or array objects\n   * themselves.\n   */\n  public Object getPropVal( Object root, String propName ) {\n    Queue<BeanLevelInfo> beanInfos =\n      newLinkedList( Optional.ofNullable( info.getProperties().get( propName ) )\n        .orElseThrow( () -> new IllegalArgumentException( \"Property not found: \" + propName ) )\n        .path );","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/core/injection/bean/BeanInjector.java#L31-L67","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\ninjector.getObject(meta, \"feildName\");\n// after\ninjector.getObject(meta, \"fieldName\"); // exact @Injection name","handlingStrategy":"validation","validationCode":"Set<String> valid = new BeanInjectionInfo(root.getClass()).getProperties().keySet();\nif (!valid.contains(propName)) throw new IllegalArgumentException(propName + \" not in \" + valid);","typeGuard":null,"tryCatchPattern":"try { return injector.getObject(meta, propName); }\ncatch (RuntimeException e) { log.warn(\"Unknown injection property \" + propName); return null; }","preventionTips":["Generate property names from BeanInjectionInfo, never hard-code strings","Keep @Injection names in sync with any plugin upgrade notes"],"tags":["pentaho-kettle","metadata-injection","reflection"],"backgroundTag":"record-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}