{"record":{"id":"57d5931c58c138b6","repo":"pentaho/pentaho-kettle","slug":"addsequencemeta-exception-unabletoreadstepinfo","errorCode":null,"errorMessage":"AddSequenceMeta.Exception.UnableToReadStepInfo","messagePattern":"AddSequenceMeta\\.Exception\\.UnableToReadStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/addsequence/AddSequenceMeta.java","lineNumber":334,"sourceCode":"\n      // Fix for backwards compatibility, only to be used from previous versions (TO DO Sven Boden: remove in later\n      // versions)\n      if ( startAt == null ) {\n        long start = rep.getStepAttributeInteger( id_step, \"start_at\" );\n        startAt = Long.toString( start );\n      }\n\n      if ( incrementBy == null ) {\n        long increment = rep.getStepAttributeInteger( id_step, \"increment_by\" );\n        incrementBy = Long.toString( increment );\n      }\n\n      if ( maxValue == null ) {\n        long max = rep.getStepAttributeInteger( id_step, \"max_value\" );\n        maxValue = Long.toString( max );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"AddSequenceMeta.Exception.UnableToReadStepInfo\" )\n        + id_step, 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, \"valuename\", valuename );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"use_database\", useDatabase );\n\n      rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, \"id_connection\", database );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"schema\", schemaName );\n      rep.saveStepAttribute( id_transformation, id_step, \"seqname\", sequenceName );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"use_counter\", useCounter );\n      rep.saveStepAttribute( id_transformation, id_step, \"counter_name\", counterName );","sourceCodeStart":316,"sourceCodeEnd":352,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/addsequence/AddSequenceMeta.java#L316-L352","documentation":"AddSequenceMeta.readRep() loads the step's settings from a repository by reading step attributes for id_step; any Exception raised while reading those attributes is rethrown as a KettleException with this message plus the step id. It means the step's metadata could not be read from the repository database for that step id.","triggerScenarios":"readRep(rep, id_step, ...) throws because the repository connection fails, the step row/attributes for id_step do not exist, or an attribute value cannot be converted (e.g. getStepAttributeInteger on corrupt data). The step id is appended to the message for diagnosis.","commonSituations":"Repository database schema mismatch after a Kettle upgrade (missing r_step_attribute rows); stale transformation referencing a deleted step id; repository connectivity/permission problems at load time.","solutions":["Run the repository upgrade/maintenance scripts for your Kettle version to ensure step attribute tables match the expected schema","Verify the step with that id_step still exists in r_step and its attribute rows are intact in the repository database","Check repository connectivity and user permissions; fix connection settings or grants as needed","Export the transformation to XML from a working environment and re-import it if repository rows are unrecoverable"],"exampleFix":"-- before: attribute row missing for the step\nSELECT * FROM r_step_attribute WHERE ID_STEP = 42; -- empty\n-- after: re-save the step from Spoon so attributes are rewritten\n-- Spoon: open transformation, re-save AddSequence step to repository","handlingStrategy":"try-catch","validationCode":"long attrCount = rep.countStepAttributes(id_step);\nif (attrCount == 0) throw new IllegalStateException(\"No repository attributes for step id \" + id_step + \"; step data missing\");","typeGuard":"boolean stepExistsInRepo(Repository rep, ObjectId idStep) throws KettleException {\n  return rep.getStepAttributeString(idStep, \"valuename\") != null;\n}","tryCatchPattern":"try {\n  meta.readRep(rep, metaStore, idStep, databases);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"UnableToReadStepInfo\")) {\n    logError(\"Repository read failed for step id \" + idStep + \": \" + e.getCause());\n    // re-export from XML source or restore from backup\n  } else throw e;\n}","preventionTips":["Run repository upgrade scripts after every Kettle version change","Verify step ids exist in r_step before loading programmatically","Maintain XML exports of critical transformations as a recovery path","Check repository DB connectivity and grants before batch loading transformations"],"tags":["kettle","pentaho","repository","metadata-loading","database"],"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"}