{"record":{"id":"99cf76f46226909a","repo":"pentaho/pentaho-kettle","slug":"unexpected-error-reading-step-information-from-the-99cf76","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":"engine/src/main/java/org/pentaho/di/trans/steps/datagrid/DataGridMeta.java","lineNumber":472,"sourceCode":"        fieldPrecision[i] = (int) rep.getStepAttributeInteger( idStep, i, \"field_precision\" );\n        setEmptyString[i] = rep.getStepAttributeBoolean( idStep, i, \"set_empty_string\", false );\n        fieldNullIf[i] = rep.getStepAttributeString( idStep, i, FIELD_NULL_IF );\n      }\n\n      int nrLines = (int) rep.getStepAttributeInteger( idStep, \"nr_lines\" );\n      dataLines = new ArrayList<>();\n      for ( int i = 0; i < nrLines; i++ ) {\n        List<String> line = new ArrayList<>();\n\n        for ( int f = 0; f < nrfields; f++ ) {\n          String item = rep.getStepAttributeString( idStep, i, \"item_\" + f );\n          line.add( item );\n        }\n\n        dataLines.add( line );\n      }\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 idTransformation, ObjectId idStep ) throws KettleException {\n    try {\n      for ( int i = 0; i < fieldName.length; i++ ) {\n        if ( fieldName[i] != null && fieldName[i].length() != 0 ) {\n          rep.saveStepAttribute( idTransformation, idStep, i, FIELD_NAME, fieldName[i] );\n          rep.saveStepAttribute( idTransformation, idStep, i, \"field_type\", fieldType[i] );\n          rep.saveStepAttribute( idTransformation, idStep, i, \"field_format\", fieldFormat[i] );\n          rep.saveStepAttribute( idTransformation, idStep, i, \"field_currency\", currency[i] );\n          rep.saveStepAttribute( idTransformation, idStep, i, \"field_decimal\", decimal[i] );\n          rep.saveStepAttribute( idTransformation, idStep, i, \"field_group\", group[i] );\n          rep.saveStepAttribute( idTransformation, idStep, i, \"field_length\", fieldLength[i] );\n          rep.saveStepAttribute( idTransformation, idStep, i, \"field_precision\", fieldPrecision[i] );\n          rep.saveStepAttribute( idTransformation, idStep, i, \"set_empty_string\", setEmptyString[i] );\n          rep.saveStepAttribute( idTransformation, idStep, i, FIELD_NULL_IF, fieldNullIf[i] );","sourceCodeStart":454,"sourceCodeEnd":490,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/datagrid/DataGridMeta.java#L454-L490","documentation":"DataGridMeta.readRep loads the step's configuration from the repository (fields, data lines). Any repository access or conversion exception during this load is wrapped in this KettleException, aborting the step's loading from the repository.","triggerScenarios":"readRep is invoked when opening a transformation stored in a repository, and repository reads (getStepAttributeString/int/table queries) fail or return data that breaks parsing — e.g. missing attribute rows, corrupted repository rows, or DB connectivity errors mid-read.","commonSituations":"Repository database schema out of sync with the engine version; network/database outage while opening a transformation; rows deleted or truncated in r_step_attribute.","solutions":["Check the chained cause for the underlying repository/database error and fix connectivity or schema first.","Verify repository schema version matches the Pentaho engine (run the repository upgrade/migration tool if needed).","Re-save the transformation or re-create the Data Grid step to rewrite its repository attributes.","Inspect r_step_attribute rows for the step's id_step and repair/restore missing attribute entries."],"exampleFix":"// no code fix; operational repair example\n-- verify attributes exist\nSELECT * FROM r_step_attribute WHERE id_step = ? AND attribute_key LIKE 'field%';","handlingStrategy":"try-catch","validationCode":"// before loading, verify repository reachability\nif (!rep.isConnected()) throw new IllegalStateException(\"Repository not connected\");","typeGuard":"boolean canLoad(Repository rep){ return rep != null && rep.isConnected(); }","tryCatchPattern":"try { meta.readRep(rep, metaStore, id_step, databases); }\ncatch (KettleException e) {\n  logError(\"Repository read failed for step: \" + e.getCause(), e);\n  // surface actionable DB error, don't swallow\n}","preventionTips":["Keep repository schema version in sync with the engine.","Check repository DB connectivity before opening transformations.","Back up r_step_attribute before migrations.","Inspect the chained cause for the true DB error."],"tags":["kettle","repository","read-failure"],"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"}