{"record":{"id":"8d54294f5f57099a","repo":"pentaho/pentaho-kettle","slug":"stepmeta-exception-stepinfocouldnotbefound","errorCode":"StepMeta.Exception.StepInfoCouldNotBeFound","errorMessage":"Step information for id_step={0} could not be found!","messagePattern":"Step information for id_step=(.+?) could not be found!","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryStepDelegate.java","lineNumber":196,"sourceCode":"        stepMeta.setClusterSchemaName( repository.getStepAttributeString( stepId, \"cluster_schema\" ) );\n\n        // Are we using a custom row distribution plugin?\n        //\n        String rowDistributionCode = repository.getStepAttributeString( stepId, 0, \"row_distribution_code\" );\n        RowDistributionInterface rowDistribution =\n          PluginRegistry.getInstance().loadClass(\n            RowDistributionPluginType.class, rowDistributionCode, RowDistributionInterface.class );\n        stepMeta.setRowDistribution( rowDistribution );\n\n        // Load the attribute groups map\n        //\n        stepMeta.setAttributesMap( loadStepAttributesMap( stepId ) );\n\n        // Done!\n        //\n        return stepMeta;\n      } else {\n        throw new KettleException( BaseMessages.getString(\n          PKG, \"StepMeta.Exception.StepInfoCouldNotBeFound\", String.valueOf( stepId ) ) );\n      }\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"StepMeta.Exception.StepCouldNotBeLoaded\", String\n        .valueOf( stepMeta.getObjectId() ) ), dbe );\n    }\n  }\n\n  /**\n   * Compatible loading of metadata for v4 style plugins using deprecated methods.\n   *\n   * @param stepMetaInterface\n   * @param repository\n   * @param objectId\n   * @param databases\n   * @throws KettleException\n   */\n  @SuppressWarnings( \"deprecation\" )","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryStepDelegate.java#L178-L214","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Query R_STEP to confirm the id exists; if missing, the transformation metadata is inconsistent — re-save the transformation or restore the step row.","Reload the transformation fresh via repository.loadTransMeta so ids come from the current repository state instead of cached/stale ids.","Check for orphaned rows in R_STEP_ATTRIBUTE and clean them with the repository repair tools.","Wrap the load in try/catch for KettleException and skip/log the offending step id if partial recovery is acceptable."],"exampleFix":"// before\nStepMeta step = repository.stepDelegate.loadStepMeta(staleStepId);\n// after\nif (repository.stepDelegate.getStepID(staleStepName, transDir) != null) {\n  StepMeta step = repository.stepDelegate.loadStepMeta(staleStepId);\n} else {\n  log.logError(\"Step row missing in repository for id \" + staleStepId);\n}","handlingStrategy":"try-catch","validationCode":"ObjectId stepId = repository.stepDelegate.getStepID(name, dirId);\nif (stepId == null) { /* step missing in repository */ }","typeGuard":"if (stepId == null || repository.stepDelegate.loadStepMeta(stepId) == null) { ... }","tryCatchPattern":"try {\n  StepMeta s = repository.stepDelegate.loadStepMeta(stepId);\n} catch (KettleException e) {\n  log.logError(\"Step \" + stepId + \" not found in repository\", e);\n}","preventionTips":["Resolve step ids fresh from the repository before loading","Avoid manually deleting rows from R_STEP","Use repository repair/maintenance tooling to clean orphaned attribute rows"],"tags":["database","repository","pentaho-kettle","record-not-found"],"backgroundTag":"record-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"}