pentaho/pentaho-kettle · error · KettleStepException
Error creating value meta for output field
Error message
Error creating value meta for output field '{fieldName}' What it means
MetaInjectMeta.getFields() builds the step's output row metadata from the configured sourceOutputFields. field.createValueMeta() throws KettlePluginException when the field's data type or conversion metadata cannot be instantiated; this is wrapped in a KettleStepException naming the offending field.
Solutions
- Check the fieldName in the message and fix its declared data type in the Meta Inject mapping grid.
- Ensure the source step still produces that field with a supported type.
- Verify all required Kettle plugins (value type providers) are installed.
- Re-select the source field in the step dialog so type metadata is regenerated.
Example fix
// before: mapping with stale/invalid type field.setType(-1); // after: explicit valid type field.setType(ValueMetaInterface.TYPE_STRING);
Defensive patterns
Strategy: validation
Validate before calling
// Validate each output field's type before calling getFields
for (MetaInjectOutputField f : sourceOutputFields) {
if (f.getType() < 0 || f.getType() >= ValueMetaInterface.typeCodes.length) {
throw new IllegalArgumentException("Invalid type for field " + f.getName());
}
} Type guard
boolean hasValidTypes(List<MetaInjectOutputField> fields) {
return fields.stream().allMatch(f -> f.getType() != -1);
} Try / catch
try {
meta.getFields(bowl, rowMeta, origin, info, nextStep, space, repository, metaStore);
} catch (KettleStepException e) {
logError("Bad output field metadata: " + e.getMessage(), e);
} Prevention
- Re-generate mappings when upstream step fields change
- Install all value-type plugins on every environment
- Review the named field in the error message first
When it happens
Trigger: getFields() iterating sourceOutputFields where a MetaInjectOutputField has an invalid/unknown type, or a plugin providing the required value meta is missing, so field.createValueMeta() throws.
Common situations: A mapping references a source field whose type was changed or removed upstream; missing value-type plugin jars; transformation copied between environments with different plugin sets.
Understand the failure class
Background: Type mismatch errors: IllegalArgumentException, TypeError and type guards across 150 open-source libraries — this error's family across 150 libraries.
Related errors
- BaseStreamStepMeta.CheckResult.ResultStepMissing
- CheckSum.Error.UnknownEvaluationMethod
- CombinationLookup.Log.UnexpectedError
- DatabaseJoinMeta.Exception.UnableToDetermineQueryFields +…
- DynamicSQLRow.Exception.IncorrectNrTemplateFields
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/d38e13f766dd5dcf.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/meta-inject/impl/src/main/java/org/pentaho/di/trans/steps/metainject/MetaInjectMeta.java:380
rep.saveStepAttribute( id_transformation, id_step, i, MAPPING_SOURCE_STEP, source.getStepname() );
rep.saveStepAttribute( id_transformation, id_step, i, MAPPING_SOURCE_FIELD, source.getField() );
}
} catch ( Exception e ) {
throw new KettleException( "Unable to save step information to the repository for id_step=" + id_step, e );
}
}
@Override
public void getFields( Bowl bowl, RowMetaInterface rowMeta, String origin, RowMetaInterface[] info, StepMeta nextStep,
VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
rowMeta.clear(); // No defined output is expected from this step.
if ( !Utils.isEmpty( sourceStepName ) ) {
for ( MetaInjectOutputField field : sourceOutputFields ) {
try {
rowMeta.addValueMeta( field.createValueMeta() );
} catch ( KettlePluginException e ) {
throw new KettleStepException( "Error creating value meta for output field '" + field.getName() + "'", e );
}
}
}
}
@Override
public StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta tr,
Trans trans ) {
return new MetaInject( stepMeta, stepDataInterface, cnr, tr, trans );
}
@Override
public StepDataInterface getStepData() {
return new MetaInjectData();
}
public Map<TargetStepAttribute, SourceStepField> getTargetSourceMapping() {
return targetSourceMapping;View on GitHub (pinned to f3058517a1)