pentaho/pentaho-kettle · error · KettleException

StepMeta.Exception.StepInfoCouldNotBeFound

StepMeta.Exception.StepInfoCouldNotBeFound

Error message

Step information for id_step={0} could not be found!

What it means

KettleDatabaseRepositoryStepDelegate.loadStepMeta() looked up a step row in the R_STEP table by step id and got no matching record, so it cannot build a StepMeta object. The repository returns null for the id, and the delegate throws a KettleException instead of returning a half-built step. It signals a broken or inconsistent repository row reference, not a user-input problem.

Solutions

  1. Query R_STEP to confirm the id exists; if missing, the transformation metadata is inconsistent — re-save the transformation or restore the step row.
  2. Reload the transformation fresh via repository.loadTransMeta so ids come from the current repository state instead of cached/stale ids.
  3. Check for orphaned rows in R_STEP_ATTRIBUTE and clean them with the repository repair tools.
  4. Wrap the load in try/catch for KettleException and skip/log the offending step id if partial recovery is acceptable.

Example fix

// before
StepMeta step = repository.stepDelegate.loadStepMeta(staleStepId);
// after
if (repository.stepDelegate.getStepID(staleStepName, transDir) != null) {
  StepMeta step = repository.stepDelegate.loadStepMeta(staleStepId);
} else {
  log.logError("Step row missing in repository for id " + staleStepId);
}
Defensive patterns

Strategy: try-catch

Validate before calling

ObjectId stepId = repository.stepDelegate.getStepID(name, dirId);
if (stepId == null) { /* step missing in repository */ }

Type guard

if (stepId == null || repository.stepDelegate.loadStepMeta(stepId) == null) { ... }

Try / catch

try {
  StepMeta s = repository.stepDelegate.loadStepMeta(stepId);
} catch (KettleException e) {
  log.logError("Step " + stepId + " not found in repository", e);
}

Prevention

When it happens

Trigger: Calling repository.stepDelegate.loadStepMeta(stepId) (or repository.loadTransMeta which loads steps for a transformation) with a step ObjectId that no longer exists in R_STEP — e.g. the step row was deleted, the id came from a stale R_TRANSFORMATION/R_STEP_ATTRIBUTE join, or the repository database is out of sync.

Common situations: Orphaned step attribute rows after a failed/partial transformation save; manually cleaning repository tables; pointing a transformation at an old repository dump; concurrent deletion of a step while another process loads the transformation.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryStepDelegate.java:196

        stepMeta.setClusterSchemaName( repository.getStepAttributeString( stepId, "cluster_schema" ) );

        // Are we using a custom row distribution plugin?
        //
        String rowDistributionCode = repository.getStepAttributeString( stepId, 0, "row_distribution_code" );
        RowDistributionInterface rowDistribution =
          PluginRegistry.getInstance().loadClass(
            RowDistributionPluginType.class, rowDistributionCode, RowDistributionInterface.class );
        stepMeta.setRowDistribution( rowDistribution );

        // Load the attribute groups map
        //
        stepMeta.setAttributesMap( loadStepAttributesMap( stepId ) );

        // Done!
        //
        return stepMeta;
      } else {
        throw new KettleException( BaseMessages.getString(
          PKG, "StepMeta.Exception.StepInfoCouldNotBeFound", String.valueOf( stepId ) ) );
      }
    } catch ( KettleDatabaseException dbe ) {
      throw new KettleException( BaseMessages.getString( PKG, "StepMeta.Exception.StepCouldNotBeLoaded", String
        .valueOf( stepMeta.getObjectId() ) ), dbe );
    }
  }

  /**
   * Compatible loading of metadata for v4 style plugins using deprecated methods.
   *
   * @param stepMetaInterface
   * @param repository
   * @param objectId
   * @param databases
   * @throws KettleException
   */
  @SuppressWarnings( "deprecation" )

View on GitHub (pinned to f3058517a1)