{"record":{"id":"4f310608f5aeec84","repo":"pentaho/pentaho-kettle","slug":"error-reading-step-with-id-step-from-the-repository","errorCode":null,"errorMessage":"error reading step with id_step= from the repository","messagePattern":"error reading step with id_step= from the repository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/numberrange/NumberRangeMeta.java","lineNumber":178,"sourceCode":"      outputField = rep.getStepAttributeString( id_step, \"outputField\" );\n\n      emptyRules();\n      String fallBackValue = rep.getStepAttributeString( id_step, \"fallBackValue\" );\n      setFallBackValue( fallBackValue );\n      int nrfields = rep.countNrStepAttributes( id_step, \"lower_bound\" );\n      for ( int i = 0; i < nrfields; i++ ) {\n        String lowerBoundStr = rep.getStepAttributeString( id_step, i, \"lower_bound\" );\n        String upperBoundStr = rep.getStepAttributeString( id_step, i, \"upper_bound\" );\n        String value = rep.getStepAttributeString( id_step, i, \"value\" );\n\n        double lowerBound = Double.parseDouble( lowerBoundStr );\n        double upperBound = Double.parseDouble( upperBoundStr );\n\n        addRule( lowerBound, upperBound, value );\n\n      }\n    } catch ( Exception dbe ) {\n      throw new KettleException( \"error reading step with id_step=\" + id_step + \" from the repository\", dbe );\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, \"inputField\", inputField );\n      rep.saveStepAttribute( id_transformation, id_step, \"outputField\", outputField );\n      rep.saveStepAttribute( id_transformation, id_step, \"fallBackValue\", getFallBackValue() );\n\n      int i = 0;\n      for ( NumberRangeRule rule : rules ) {\n        rep\n          .saveStepAttribute( id_transformation, id_step, i, \"lower_bound\", String\n            .valueOf( rule.getLowerBound() ) );\n        rep\n          .saveStepAttribute( id_transformation, id_step, i, \"upper_bound\", String\n            .valueOf( rule.getUpperBound() ) );","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/numberrange/NumberRangeMeta.java#L160-L196","documentation":"NumberRangeMeta.readRep() loads the step's range rules from the repository, parsing stored lower_bound/upper_bound strings into doubles. Any failure (DB read error or unparseable numeric text) is wrapped in a KettleException with 'error reading step with id_step=<id> from the repository'.","triggerScenarios":"readRep(rep, metaStore, id_step) throwing when getStepAttributeString fails or Double.parseDouble rejects a stored bound value.","commonSituations":"Repository attributes hand-edited or written by a version using a different number format; repository DB connectivity loss; missing id_step / corrupted attribute rows.","solutions":["Inspect getCause(): if it is a NumberFormatException, fix the stored lower_bound/upper_bound attribute values in R_STEP_ATTRIBUTE to plain doubles.","Verify repository connectivity and that id_step exists.","Re-save the step from Spoon so bounds are rewritten in canonical format.","Restore corrupted repository rows from backup."],"exampleFix":"// before (repository attribute)\nlower_bound = 0,5\n// after\nlower_bound = 0.5","handlingStrategy":"try-catch","validationCode":"// Before readRep, sanity-check stored bounds in R_STEP_ATTRIBUTE are numeric","typeGuard":"boolean isParseableDouble(String s) { if (s == null) return false; try { Double.parseDouble(s.trim()); return true; } catch (NumberFormatException e) { return false; } }","tryCatchPattern":"try { meta.readRep(rep, metaStore, idStep, databases); } catch (KettleException e) { log.error(\"Number Range readRep failed for \" + idStep + \": \" + e.getCause(), e); }","preventionTips":["Never edit R_STEP_ATTRIBUTE rows by hand; re-save via Spoon instead.","Check getCause() to distinguish NumberFormatException from DB failures.","Test repository connectivity before loads.","Back up repository metadata before manual fixes."],"tags":["kettle","repository","number-format","metadata-load"],"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"}