pentaho/pentaho-kettle · error · KettleException
Error inject property
Error message
Error inject property '<propName>' into <rootClass>
What it means
Wrapping KettleException raised when the underlying setProperty(root, prop, ...) call throws while injecting a value into a property whose injection path has no arrays. The original exception (reflection access, conversion, null handling) is attached as the cause.
Solutions
- Read ex.getCause() to find the real reflection/conversion failure
- Verify the injected value's type/format matches the field's declared type
- Ensure the target step object was fully initialized (fields instantiated) before injection
Example fix
// before inject "true/false" text into a boolean[] indexed field // after inject proper boolean value or convert: "Y"/"N" per converter spec
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-check value convertibility
Object v = data.get(0).getString("value", null);
Objects.requireNonNull(v, "Injection source value must not be null"); Try / catch
try { injector.setProperty(root, prop, data, n); }
catch (KettleException e) { throw new IllegalStateException("Set failed on " + propName + ": " + e.getCause(), e); } Prevention
- Match source field types to the target field type (String vs boolean vs int)
- Initialize step metadata objects with defaults() before injecting
- Always log getCause() to find the underlying reflection failure
When it happens
Trigger: Property exists, but setting it failed — e.g. field inaccessible, type conversion from RowMetaAndData value to field type failed, or a getter/setter in the path threw.
Common situations: Injecting a String value into a non-String field without convertible format; target object in inconsistent state; plugin field type changed between versions.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- No setter defined for
- Property not found
- 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/b61f497da8558e8c.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/core/injection/bean/BeanInjector.java:176
throw new KettleException( "Property '" + propName + "' not found for injection to " + root.getClass() );
}
String dataName;
String dataValue;
if ( data != null ) {
dataName = dataN;
dataValue = null;
} else {
dataName = null;
dataValue = dataN;
}
if ( prop.pathArraysCount == 0 ) {
// no arrays in path
try {
setProperty( root, prop, 0, data != null ? data.get( 0 ) : null, dataName, dataValue );
} catch ( Exception ex ) {
throw new KettleException( "Error inject property '" + propName + "' into " + root.getClass(), ex );
}
} else if ( prop.pathArraysCount == 1 ) {
// one array in path
try {
if ( data != null ) {
for ( int i = 0; i < data.size(); i++ ) {
setProperty( root, prop, i, data.get( i ), dataName, dataValue );
}
} else {
allocateCollectionField( root, info, propName );
for ( int i = 0;; i++ ) {
// NOTE: case when constant value is provided and need to fill out all entries with the same value
// assumption is the field array/list size allocated to correct size
boolean found = setProperty( root, prop, i, null, null, dataValue );
if ( !found ) {
break;
}
}View on GitHub (pinned to f3058517a1)