pentaho/pentaho-kettle · error · KettleStepException
DBProc.Exception.CouldnotFindField
DBProc.Exception.CouldnotFindField
Error message
DBProc.Exception.CouldnotFindField
What it means
DBProc looks up each IN/INOUT stored-procedure argument in the incoming row. When an argument field is not found in the input row (indexOfValue returns -1), the step logs the lookup error and throws this KettleStepException, stopping the step because the procedure cannot be invoked without the parameter.
Solutions
- Fix the argument name in the DB Procedure step to exactly match a field in the input stream.
- Add or restore the field upstream (e.g. via a Select Values / Get Variables step) before this step.
- Check the upstream step's field list (right-click -> Show input fields) and correct case-sensitive differences.
- If the argument is genuinely optional, change its direction handling or wire a default value into the stream.
Example fix
// before: argument 'custId' but stream has 'customer_id' Argument: custId // after Argument: customer_id
Defensive patterns
Strategy: validation
Validate before calling
// before running the transform, check arguments exist in the input layout
for (int i=0;i<meta.getArgument().length;i++) {
if (!"OUT".equalsIgnoreCase(meta.getArgumentDirection()[i])
&& rowMeta.indexOfValue(meta.getArgument()[i]) < 0)
throw new IllegalArgumentException("Missing DBProc argument field: "+meta.getArgument()[i]);
} Type guard
boolean hasField(RowMetaInterface row, String name){ return row.indexOfValue(name) >= 0; } Try / catch
try { putRow(rowMeta, outputRowData); }
catch (KettleStepException e) {
logError("DBProc argument missing: " + e.getMessage(), e);
setErrors(1); stopAll(true);
} Prevention
- Verify argument names against the upstream step's output field list.
- Watch for case-sensitive field name mismatches.
- Fix the field before the step if upstream renames occur.
- Use one clear input stream for the DBProc step.
When it happens
Trigger: processRow -> outputRowData -> runProc executes while meta.getArgument()[i] names a field absent from the input row (for IN or INOUT direction).
Common situations: Upstream step renamed or removed the field; argument name typo in the DB Procedure step; wrong stream selected when the transform has multiple inputs; case-sensitive field mismatch.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Calculator.Error.NoNameField
- Can not find field [ ] in the input stream!
- ChangeFileEncoding.Error.FilenameFieldMissing
- ChangeFileEncoding.Error.TargetFilenameFieldMissing
- ChangeFileEncoding.Exception.CouldnotFindField
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/4be5cd1c25df4a2e.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/dbproc/DBProc.java:68
}
private Object[] runProc( RowMetaInterface rowMeta, Object[] rowData ) throws KettleException {
if ( first ) {
first = false;
// get the RowMeta for the output
//
data.outputMeta = data.inputRowMeta.clone();
meta.getFields( getTransMeta().getBowl(), data.outputMeta, getStepname(), null, null, this, repository,
metaStore );
data.argnrs = new int[meta.getArgument().length];
for ( int i = 0; i < meta.getArgument().length; i++ ) {
if ( !meta.getArgumentDirection()[i].equalsIgnoreCase( "OUT" ) ) { // IN or INOUT
data.argnrs[i] = rowMeta.indexOfValue( meta.getArgument()[i] );
if ( data.argnrs[i] < 0 ) {
logError( BaseMessages.getString( PKG, "DBProc.Log.ErrorFindingField" ) + meta.getArgument()[i] + "]" );
throw new KettleStepException( BaseMessages.getString( PKG, "DBProc.Exception.CouldnotFindField", meta
.getArgument()[i] ) );
}
} else {
data.argnrs[i] = -1;
}
}
data.db.setProcLookup( environmentSubstitute( meta.getProcedure() ), meta.getArgument(), meta
.getArgumentDirection(), meta.getArgumentType(), meta.getResultName(), meta.getResultType() );
}
Object[] outputRowData = RowDataUtil.resizeArray( rowData, data.outputMeta.size() );
int outputIndex = rowMeta.size();
data.db.setProcValues( rowMeta, rowData, data.argnrs, meta.getArgumentDirection(), !Utils.isEmpty( meta
.getResultName() ) );
RowMetaAndData add =View on GitHub (pinned to f3058517a1)