{"record":{"id":"329ff4ee08051638","repo":"pentaho/pentaho-kettle","slug":"unexpected-error-reading-step-information-from-the-329ff4","errorCode":null,"errorMessage":"Unexpected error reading step information from the repository","messagePattern":"Unexpected error reading step information from the repository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/meta-inject/impl/src/main/java/org/pentaho/di/trans/steps/metainject/MetaInjectMeta.java","lineNumber":323,"sourceCode":"      targetFile = rep.getStepAttributeString( id_step, TARGET_FILE );\n      noExecution = rep.getStepAttributeBoolean( id_step, NO_EXECUTION );\n\n      int nrMappings = rep.countNrStepAttributes( id_step, MAPPING_TARGET_STEP_NAME );\n      for ( int i = 0; i < nrMappings; i++ ) {\n        String targetStepname = rep.getStepAttributeString( id_step, i, MAPPING_TARGET_STEP_NAME );\n        String targetAttributeKey = rep.getStepAttributeString( id_step, i, MAPPING_TARGET_ATTRIBUTE_KEY );\n        boolean targetDetail = rep.getStepAttributeBoolean( id_step, i, MAPPING_TARGET_DETAIL );\n        String sourceStepname = rep.getStepAttributeString( id_step, i, MAPPING_SOURCE_STEP );\n        String sourceField = rep.getStepAttributeString( id_step, i, MAPPING_SOURCE_FIELD );\n\n        TargetStepAttribute target = new TargetStepAttribute( targetStepname, targetAttributeKey, targetDetail );\n        SourceStepField source = new SourceStepField( sourceStepname, sourceField );\n        targetSourceMapping.put( target, source );\n      }\n\n      MetaInjectMigration.migrate( targetSourceMapping );\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unexpected error reading step information from the repository\", e );\n    }\n  }\n\n  @Override\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step )\n    throws KettleException {\n    try {\n      rep.saveStepAttribute( id_transformation, id_step, SPECIFICATION_METHOD, specificationMethod == null ? null\n        : specificationMethod.getCode() );\n      rep.saveStepAttribute( id_transformation, id_step, TRANS_OBJECT_ID, transObjectId == null ? null : transObjectId\n        .toString() );\n      rep.saveStepAttribute( id_transformation, id_step, FILENAME, fileName );\n      rep.saveStepAttribute( id_transformation, id_step, TRANS_NAME, transName );\n      rep.saveStepAttribute( id_transformation, id_step, DIRECTORY_PATH, directoryPath );\n\n      rep.saveStepAttribute( id_transformation, id_step, SOURCE_STEP, sourceStepName );\n      rep.saveStepAttribute( id_transformation, id_step, STREAM_SOURCE_STEP, streamSourceStepname );\n      rep.saveStepAttribute( id_transformation, id_step, STREAM_TARGET_STEP, streamTargetStepname );","sourceCodeStart":305,"sourceCodeEnd":341,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/meta-inject/impl/src/main/java/org/pentaho/di/trans/steps/metainject/MetaInjectMeta.java#L305-L341","documentation":"MetaInjectMeta.readRep() rebuilds the target/source mapping from repository step attributes and then runs MetaInjectMigration. Any exception while reading attributes or migrating the mapping is wrapped in a KettleException with this message. It fails loading the transformation from the repository.","triggerScenarios":"readRep(rep, metaStore, id_step, databases) encountering repository I/O errors, missing step attributes for the Meta Inject step, or MetaInjectMigration throwing on legacy mapping rows.","commonSituations":"Corrupt or partially migrated repository rows after a PDI upgrade; database connectivity drops mid-load; repository records created by an incompatible older plugin version.","solutions":["Inspect the wrapped cause to find whether attribute reads or MetaInjectMigration failed.","Reopen and re-save the step in Spoon to rewrite its repository attributes.","Verify repository database connectivity and integrity.","Ensure the PDI client version matches the repository content version so migration runs correctly."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Before loading, confirm the step's attributes exist\nObjectId id_step = rep.getStepID(stepname, id_transformation);\nint count = rep.countNrStepAttributes(id_step, MetaInjectMeta.MAPPING_TARGET_STEP);\nif (count == 0) log.Warn(\"MetaInject step has no stored mappings\");","typeGuard":null,"tryCatchPattern":"try {\n  meta.readRep(rep, metaStore, id_step, databases);\n} catch (KettleException e) {\n  logError(\"Repository read failed for step \" + id_step + \": \" + e.getCause(), e);\n}","preventionTips":["Complete repository migrations fully after PDI upgrades","Monitor repository DB health","Re-save legacy steps once through Spoon to rewrite attributes"],"tags":["repository","kettle","meta-inject","persistence"],"backgroundTag":"database-query-failed","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"}