{"record":{"id":"03e5c014df70af2c","repo":"pentaho/pentaho-kettle","slug":"unexpected-error-reading-step-information-from-the-03e5c0","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/getvariable/GetVariableMeta.java","lineNumber":256,"sourceCode":"        fieldDefinitions[i].setFieldFormat( rep.getStepAttributeString( id_step, i, \"field_format\" ) );\n        fieldDefinitions[i].setCurrency( rep.getStepAttributeString( id_step, i, \"field_currency\" ) );\n        fieldDefinitions[i].setDecimal( rep.getStepAttributeString( id_step, i, \"field_decimal\" ) );\n        fieldDefinitions[i].setGroup( rep.getStepAttributeString( id_step, i, \"field_group\" ) );\n        fieldDefinitions[i].setFieldLength( (int) rep.getStepAttributeInteger( id_step, i, \"field_length\" ) );\n        fieldDefinitions[i].setFieldPrecision( (int) rep.getStepAttributeInteger( id_step, i, \"field_precision\" ) );\n        fieldDefinitions[i].setTrimType(\n          ValueMetaString.getTrimTypeByCode( rep.getStepAttributeString( id_step, i, \"field_trim_type\" ) ) );\n\n        // Backward compatibility\n        //\n        int fieldType = fieldDefinitions[i].getFieldType();\n        if ( fieldType == ValueMetaInterface.TYPE_NONE ) {\n          fieldDefinitions[i].setFieldType( ValueMetaInterface.TYPE_STRING );\n        }\n      }\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 id_transformation, ObjectId id_step )\n    throws KettleException {\n    try {\n\n      for ( int i = 0; i < fieldDefinitions.length; i++ ) {\n        String fieldName = fieldDefinitions[i].getFieldName();\n        if ( fieldName != null && fieldName.length() != 0 ) {\n          rep.saveStepAttribute( id_transformation, id_step, i, \"field_name\", fieldName );\n          rep.saveStepAttribute( id_transformation, id_step, i, \"field_variable\", fieldDefinitions[i]\n              .getVariableString() );\n          rep.saveStepAttribute( id_transformation, id_step, i, \"field_type\",\n            ValueMetaFactory.getValueMetaName( fieldDefinitions[i].getFieldType() ) );\n          rep.saveStepAttribute( id_transformation, id_step, i, \"field_format\", fieldDefinitions[i].getFieldFormat() );\n          rep.saveStepAttribute( id_transformation, id_step, i, \"field_currency\", fieldDefinitions[i].getCurrency() );","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/getvariable/GetVariableMeta.java#L238-L274","documentation":"GetVariableMeta.readRep reads the step's field definitions from repository attributes and wraps any exception in a KettleException with the literal message 'Unexpected error reading step information from the repository'. Each field's type is normalized (TYPE_NONE -> TYPE_STRING), but repository read failures or bad stored values trigger this wrapper.","triggerScenarios":"readRep throws while calling rep.getStepAttributeString/getStepAttributeInteger over the numbered field rows — repository connection failure, missing id_step, or a stored attribute value that fails numeric/boolean conversion.","commonSituations":"Repository down or credentials expired when loading a transformation; repository schema drifted from client version; orphaned step id after a failed save left partial data.","solutions":["Check e.getCause() for the actual repository error (connection, conversion, not-found).","Reconnect to the repository and reload the transformation.","Re-open and re-save the step in Spoon to rewrite its attributes.","Align repository schema version with the Pentaho client."],"exampleFix":"// before\ntry {\n  transMeta.readRep( rep, metaStore, id_transformation, null );\n} catch ( KettleException e ) {\n  throw e;\n}\n// after\ntry {\n  transMeta.readRep( rep, metaStore, id_transformation, null );\n} catch ( KettleException e ) {\n  logError( \"Read failed: \" + e.getCause() + \" - reloading repository meta\" );\n  rep.disconnect();\n  rep.connect( env, user, pass );\n  transMeta.readRep( rep, metaStore, id_transformation, null );\n}","handlingStrategy":"try-catch","validationCode":"if ( rep == null || !rep.isConnected() ) {\n  throw new IllegalStateException( \"Repository not connected before readRep\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.readRep( rep, metaStore, idTrans, null );\n} catch ( KettleException e ) {\n  logError( \"Unexpected read error: \" + e.getCause() + \" - reconnect and retry\" );\n}","preventionTips":["Reconnect/re-authenticate long-running repository sessions.","Align repository schema and client versions.","Detect and clean partial/failed saves producing orphaned step ids."],"tags":["kettle","repository","metadata","deserialization"],"backgroundTag":"file-read-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"}