{"record":{"id":"1e16b633a0e645e2","repo":"pentaho/pentaho-kettle","slug":"joinrowsmeta-exception","errorCode":"JoinRowsMeta.Exception.UnexpectedErrorInReadStepInfoFromRepository","errorMessage":"JoinRowsMeta.Exception.UnexpectedErrorInReadStepInfoFromRepository","messagePattern":"JoinRowsMeta\\.Exception\\.UnexpectedErrorInReadStepInfoFromRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/joinrows/JoinRowsMeta.java","lineNumber":255,"sourceCode":"\n    return retval.toString();\n  }\n\n  @Override\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {\n    try {\n      directory = rep.getStepAttributeString( id_step, \"directory\" );\n      prefix = rep.getStepAttributeString( id_step, \"prefix\" );\n      cacheSize = (int) rep.getStepAttributeInteger( id_step, \"cache_size\" );\n\n      mainStepname = rep.getStepAttributeString( id_step, \"main\" );\n\n      condition = rep.loadConditionFromStepAttribute( id_step, \"id_condition\" );\n      if ( condition == null ) {\n        condition = new Condition();\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"JoinRowsMeta.Exception.UnexpectedErrorInReadStepInfoFromRepository\" ), e );\n    }\n  }\n\n  @Override\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      rep.saveStepAttribute( id_transformation, id_step, \"directory\", directory );\n      rep.saveStepAttribute( id_transformation, id_step, \"prefix\", prefix );\n      rep.saveStepAttribute( id_transformation, id_step, \"cache_size\", cacheSize );\n\n      if ( mainStepname == null ) {\n        mainStepname = getLookupStepname();\n      }\n      rep.saveStepAttribute( id_transformation, id_step, \"main\", mainStepname );\n\n      rep.saveConditionStepAttribute( id_transformation, id_step, \"id_condition\", condition );\n    } catch ( Exception e ) {","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/joinrows/JoinRowsMeta.java#L237-L273","documentation":"JoinRowsMeta.readRep() throws this KettleException when loading Join Rows step attributes from a repository fails unexpectedly. Attributes such as prefix, main step name, and the saved condition are read via rep.loadStepAttribute/loadConditionFromStepAttribute; any repository-side exception during these calls is wrapped in this error. It means the step definition could not be read from the repository, not that the data is necessarily wrong.","triggerScenarios":"readRep invoked by loadXML when the transformation is loaded from a repository; fails if the repository connection is broken, the step row (r) or id_step is invalid, or loadConditionFromStepAttribute throws while fetching \"id_condition\".","commonSituations":"Repository database temporarily unavailable or connection dropped mid-load; orphaned step rows after a partial save or repository upgrade; repository schema version mismatch between PDI client and repository tables.","solutions":["Verify repository connectivity and re-open the repository connection, then retry loading the transformation.","Check the repository tables (r_step_attribute, r_condition) for missing rows for this id_step; re-save the step from Spoon.","Run the repository upgrade (Tools > Explore/Repair) if PDI and repository versions differ.","Load the transformation from a .ktr file export instead of the repository to isolate repository-side issues."],"exampleFix":"// before\nrepository.connect( \"prod_rep\" );\nTransMeta tm = new TransMeta( repository, \"ETL/Join Transform\" ); // readRep throws\n\n// after ( validate connection + fall back to file )\nrepository.connect( \"prod_rep\" );\nif ( !repository.isConnected() || !repository.exists( \"ETL/Join Transform\", RepositoryObjectType.TRANSFORMATION ) ) {\n  throw new IllegalStateException( \"Transformation missing in repository\" );\n}\nTransMeta tm;\ntry {\n  tm = new TransMeta( repository, \"ETL/Join Transform\" );\n} catch ( KettleException e ) {\n  tm = new TransMeta( \"backup/Join Transform.ktr\" ); // file fallback\n}","handlingStrategy":"retry","validationCode":"if ( repository == null || !repository.isConnected() ) {\n  throw new IllegalStateException( \"Repository not connected before loading transformation\" );\n}","typeGuard":null,"tryCatchPattern":"for ( int attempt = 1; attempt <= 3; attempt++ ) {\n  try { return new TransMeta( repository, transName, null, null, null ); }\n  catch ( KettleException e ) {\n    if ( attempt == 3 || e.getMessage() == null\n         || !e.getMessage().contains( \"UnexpectedErrorInReadStepInfoFromRepository\" ) ) throw e;\n    repository.disconnect(); Thread.sleep( 2000 ); repository.connect( user, pass );\n  }\n}","preventionTips":["Verify repository connectivity (and VPN/DB health) before programmatic loads.","Keep PDI client and repository schema versions aligned; run repository upgrades when upgrading.","Periodically re-save legacy transformations from Spoon so repository rows for steps are complete.","Export critical transformations to .ktr as an accessible fallback."],"tags":["kettle","join-rows","repository","metadata"],"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"}