pentaho/pentaho-kettle · error · KettleException
JavaFilter.Log.TargetStepInvalid
JavaFilter.Log.TargetStepInvalid
Error message
JavaFilter.Log.TargetStepInvalid
What it means
Thrown by the Java Filter step's processRow when the 'true' (match) target hop's RowSet cannot be found at runtime, meaning the configured true-target step is not connected or not resolvable. The step cannot route matching rows without a valid output hop.
Solutions
- Open the Java Filter step and re-select the correct 'true' target step.
- Recreate the missing hop from the filter to the target step.
- Rename the filter's targets after renaming steps (names are stored as strings).
- Re-save the transformation after topology changes so target references refresh.
Example fix
// before (metadata) trueTarget = "Deleted Step" // after trueTarget = "Send to Kafka" (existing step name)
Defensive patterns
Strategy: validation
Validate before calling
// Before execution, confirm both target steps are connected
for (StreamInterface s : meta.getStepIOMeta().getTargetStreams()) {
if (transMeta.findStep(s.getStepname()) == null) {
throw new IllegalStateException("Java Filter target step missing: " + s.getStepname());
}
} Prevention
- Re-check Java Filter targets whenever renaming/deleting steps.
- Keep both true/false hops connected before saving.
- Run the transformation check in Spoon prior to execution.
When it happens
Trigger: data.chosesTargetSteps is true and findOutputRowSet(stepname, copy, targetStreams.get(0).getStepname(), 0) returns null — the true-target step name in metadata does not correspond to a connected hop at runtime.
Common situations: Target step deleted/renamed after configuration; transformation executed with the true hop disconnected; cluster/remote execution where the hop was not deployed; running an old .ktr with stale step names.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- The result of the filter expression must be a boolean and…
- A connection of type PALO is expected
- A connection of type PALO is expected
- A deadlock was detected between steps
- A server socket allocation always has to accompanied by a…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/ad839648d9caf8e5.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/javafilter/JavaFilter.java:78
setOutputDone();
return false;
}
if ( first ) {
first = false;
data.outputRowMeta = getInputRowMeta().clone();
meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,
metaStore );
// Cache the position of the RowSet for the output.
//
if ( data.chosesTargetSteps ) {
List<StreamInterface> targetStreams = meta.getStepIOMeta().getTargetStreams();
data.trueRowSet = findOutputRowSet( getStepname(), getCopy(), targetStreams.get( 0 ).getStepname(), 0 );
if ( data.trueRowSet == null ) {
throw new KettleException( BaseMessages.getString(
PKG, "JavaFilter.Log.TargetStepInvalid", targetStreams.get( 0 ).getStepname() ) );
}
data.falseRowSet = findOutputRowSet( getStepname(), getCopy(), targetStreams.get( 1 ).getStepname(), 0 );
if ( data.falseRowSet == null ) {
throw new KettleException( BaseMessages.getString(
PKG, "JavaFilter.Log.TargetStepInvalid", targetStreams.get( 1 ).getStepname() ) );
}
}
}
if ( log.isRowLevel() ) {
logRowlevel( "Read row #" + getLinesRead() + " : " + getInputRowMeta().getString( r ) );
}
boolean keep = calcFields( getInputRowMeta(), r );
View on GitHub (pinned to f3058517a1)