pentaho/pentaho-kettle · error · KettleException

TransformClassBase.Exception.UnableToFindTargetRowSetForStep

Error message

TransformClassBase.Exception.UnableToFindTargetRowSetForStep

What it means

Target-resolution failure in TransformClassBase.findTargetRowSet: the tag mapped to a target step name, but no output row set for that step name could be found on this user-defined-java-class copy. Typically the target step was renamed, has no hop, or targets a different copy number.

Solutions

  1. Verify the mapped target step name matches the step in the transformation exactly.
  2. Reconnect the target hop so the output rowset is created.
  3. Re-select the target step in the UDJC dialog to refresh the stored mapping.

Example fix

// before: mapping to a step that no longer exists
findTargetRowSet("outputA"); // 'Output Step A' was renamed
// after: remap to current step name
addTargetSource("outputA", "Output Step A (new)");
Defensive patterns

Strategy: validation

Validate before calling

String stepname = data.targetMap.get(tag); if (stepname == null || transMeta.findStep(stepname) == null) { /* remap target */ }

Type guard

boolean targetStepExists(String stepname) { return stepname != null && getTransMeta().findStep(stepname) != null; }

Try / catch

try { RowSet rs = findTargetRowSet(tag); ... } catch (KettleException e) { logError("No output RowSet for target step of tag " + tag, e); throw e; }

Prevention

When it happens

Trigger: findTargetRowSet("tag") where data.targetMap maps to a step name that has no active output rowset, e.g. the target step is disconnected, disabled, or renamed after the mapping was persisted.

Common situations: Target step renamed in the transformation while the UDJC mapping keeps the stale name; the target step failed to initialize; running a partial transformation without the target hop.

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


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/81066fc4daca85eb. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/userdefinedjavaclass/TransformClassBase.java:597

    if ( rowSet == null ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "TransformClassBase.Exception.UnableToFindInfoRowSetForStep", stepname ) );
    }
    return rowSet;
  }

  public RowSet findTargetRowSet( String tag ) throws KettleException {
    if ( tag == null ) {
      return null;
    }
    String stepname = data.targetMap.get( tag );
    if ( Utils.isEmpty( stepname ) ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "TransformClassBase.Exception.UnableToFindTargetStepNameForTag", tag ) );
    }
    RowSet rowSet = findOutputRowSet( stepname );
    if ( rowSet == null ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "TransformClassBase.Exception.UnableToFindTargetRowSetForStep", stepname ) );
    }
    return rowSet;
  }

  private final Map<String, FieldHelper> inFieldHelpers = new HashMap<String, FieldHelper>();
  private final Map<String, FieldHelper> infoFieldHelpers = new HashMap<String, FieldHelper>();
  private final Map<String, FieldHelper> outFieldHelpers = new HashMap<String, FieldHelper>();

  public enum Fields {
    In, Out, Info;
  }

  public FieldHelper get( Fields type, String name ) throws KettleStepException {
    FieldHelper fh;
    switch ( type ) {
      case In:
        fh = inFieldHelpers.get( name );

View on GitHub (pinned to f3058517a1)