{"record":{"id":"81066fc4daca85eb","repo":"pentaho/pentaho-kettle","slug":"transformclassbase-exception-unabletofindtargetrowsetforstep","errorCode":null,"errorMessage":"TransformClassBase.Exception.UnableToFindTargetRowSetForStep","messagePattern":"TransformClassBase\\.Exception\\.UnableToFindTargetRowSetForStep","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/userdefinedjavaclass/TransformClassBase.java","lineNumber":597,"sourceCode":"    if ( rowSet == null ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"TransformClassBase.Exception.UnableToFindInfoRowSetForStep\", stepname ) );\n    }\n    return rowSet;\n  }\n\n  public RowSet findTargetRowSet( String tag ) throws KettleException {\n    if ( tag == null ) {\n      return null;\n    }\n    String stepname = data.targetMap.get( tag );\n    if ( Utils.isEmpty( stepname ) ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"TransformClassBase.Exception.UnableToFindTargetStepNameForTag\", tag ) );\n    }\n    RowSet rowSet = findOutputRowSet( stepname );\n    if ( rowSet == null ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"TransformClassBase.Exception.UnableToFindTargetRowSetForStep\", stepname ) );\n    }\n    return rowSet;\n  }\n\n  private final Map<String, FieldHelper> inFieldHelpers = new HashMap<String, FieldHelper>();\n  private final Map<String, FieldHelper> infoFieldHelpers = new HashMap<String, FieldHelper>();\n  private final Map<String, FieldHelper> outFieldHelpers = new HashMap<String, FieldHelper>();\n\n  public enum Fields {\n    In, Out, Info;\n  }\n\n  public FieldHelper get( Fields type, String name ) throws KettleStepException {\n    FieldHelper fh;\n    switch ( type ) {\n      case In:\n        fh = inFieldHelpers.get( name );","sourceCodeStart":579,"sourceCodeEnd":615,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/userdefinedjavaclass/TransformClassBase.java#L579-L615","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Verify the mapped target step name matches the step in the transformation exactly.","Reconnect the target hop so the output rowset is created.","Re-select the target step in the UDJC dialog to refresh the stored mapping."],"exampleFix":"// before: mapping to a step that no longer exists\nfindTargetRowSet(\"outputA\"); // 'Output Step A' was renamed\n// after: remap to current step name\naddTargetSource(\"outputA\", \"Output Step A (new)\");","handlingStrategy":"validation","validationCode":"String stepname = data.targetMap.get(tag); if (stepname == null || transMeta.findStep(stepname) == null) { /* remap target */ }","typeGuard":"boolean targetStepExists(String stepname) { return stepname != null && getTransMeta().findStep(stepname) != null; }","tryCatchPattern":"try { RowSet rs = findTargetRowSet(tag); ... } catch (KettleException e) { logError(\"No output RowSet for target step of tag \" + tag, e); throw e; }","preventionTips":["Re-select the target step in the dialog after renames","Confirm target steps are enabled and connected","Test-run the transformation after structural edits"],"tags":["kettle","udjc","rowset","target-stream"],"backgroundTag":"entity-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}