{"record":{"id":"fe7d0c76624b69e4","repo":"pentaho/pentaho-kettle","slug":"error-reading-step-with-id-step-id-step-from-the-repository","errorCode":null,"errorMessage":"error reading step with id_step=<id_step> from the repository","messagePattern":"error reading step with id_step=<id_step> from the repository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/dummy/core/src/main/java/org/pentaho/di/be/ibridge/kettle/dummy/DummyPluginMeta.java","lineNumber":161,"sourceCode":"      int length = (int) rep.getStepAttributeInteger( id_step, 0, \"value_length\" );\n      int precision = (int) rep.getStepAttributeInteger( id_step, 0, \"value_precision\" );\n\n      int type = ValueMetaFactory.getIdForValueMeta( typedesc );\n      value = new ValueMetaAndData( new ValueMeta( name, type ), null );\n      value.getValueMeta().setLength( length );\n      value.getValueMeta().setPrecision( precision );\n\n      if ( isnull ) {\n        value.setValueData( null );\n      } else {\n        ValueMetaInterface stringMeta = new ValueMetaString( name );\n        if ( type != ValueMetaInterface.TYPE_STRING ) {\n          text = Const.trim( text );\n        }\n        value.setValueData( value.getValueMeta().convertData( stringMeta, text ) );\n      }\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( \"error reading step with id_step=\" + id_step + \" from the repository\", dbe );\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unexpected error reading step with id_step=\" + id_step + \" from the repository\", e );\n    }\n  }\n\n  @Override\n  public void saveRep( Repository rep, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      rep.saveStepAttribute( id_transformation, id_step, \"value_name\", value.getValueMeta().getName() );\n      rep.saveStepAttribute( id_transformation, id_step, 0, \"value_type\", value.getValueMeta().getTypeDesc() );\n      rep.saveStepAttribute( id_transformation, id_step, 0, \"value_text\", value.getValueMeta().getString( value.getValueData() ) );\n      rep.saveStepAttribute( id_transformation, id_step, 0, \"value_null\", value.getValueMeta().isNull( value.getValueData() ) );\n      rep.saveStepAttribute( id_transformation, id_step, 0, \"value_length\", value.getValueMeta().getLength() );\n      rep.saveStepAttribute( id_transformation, id_step, 0, \"value_precision\", value.getValueMeta().getPrecision() );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( \"Unable to save step information to the repository, id_step=\" + id_step, dbe );\n    }\n  }","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/dummy/core/src/main/java/org/pentaho/di/be/ibridge/kettle/dummy/DummyPluginMeta.java#L143-L179","documentation":"DummyPluginMeta.readRep rehydrates the step's value (name, type, text, length, precision) from repository step attributes. Any KettleDatabaseException thrown while querying those attributes (rep.getStepAttributeString/Boolean/Integer) is wrapped in a KettleException with this message, carrying id_step for traceability. The database cause is chained.","triggerScenarios":"readRep(rep, id_step, ...) when the underlying repository connection fails mid-query, the R_ step-attribute table is locked/unavailable, or the repository schema is corrupted so getStepAttributeString/Integer/Boolean throws KettleDatabaseException.","commonSituations":"Repository DB (e.g. Postgres/MySQL/Oracle) down or restarted mid-load; network outage between PDI and repository DB; stale connection pool after DB failover; repository schema upgrade mismatch.","solutions":["Check the chained KettleDatabaseException for the JDBC error code/message (connection refused, table missing, lock timeout).","Verify repository database connectivity (ping, test the DB connection in PDI's repository login).","Re-open the transformation after connectivity is restored; the step data itself is usually fine.","If persistent, repair/check the repository schema (repository upgrade script) for the step-attribute tables."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// verify repository connectivity before loading\nif ( !rep.isConnected() ) {\n  rep.connect( \"user\", \"pass\" );\n}\nrep.getStepAttributeString( id_step, 0, \"value_name\" ); // probe read","typeGuard":null,"tryCatchPattern":"try {\n  meta.readRep( rep, id_step, databases, counters );\n} catch ( KettleException e ) {\n  if ( e.getCause() instanceof KettleDatabaseException ) {\n    // transient DB issue: reconnect and retry\n    rep.disconnect();\n    rep.connect( user, pass );\n    meta.readRep( rep, id_step, databases, counters );\n  } else {\n    throw e;\n  }\n}","preventionTips":["Monitor repository DB health and connection pool settings","Reconnect the repository after DB failover/restart","Keep the PDI client and repository schema versions in sync","Log the id_step from the message to pinpoint the failing step"],"tags":["database","repository","pdi","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"}