{"record":{"id":"c475423df3a07640","repo":"pentaho/pentaho-kettle","slug":"unexpected-error-reading-step-information-from-the-c47542","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":"plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/addxml/AddXMLMeta.java","lineNumber":302,"sourceCode":"\n      for ( int i = 0; i < nrfields; i++ ) {\n        outputFields[i] = new XMLField();\n\n        outputFields[i].setFieldName( rep.getStepAttributeString( id_step, i, \"field_name\" ) );\n        outputFields[i].setElementName( rep.getStepAttributeString( id_step, i, \"field_element\" ) );\n        outputFields[i].setType( rep.getStepAttributeString( id_step, i, \"field_type\" ) );\n        outputFields[i].setFormat( rep.getStepAttributeString( id_step, i, \"field_format\" ) );\n        outputFields[i].setCurrencySymbol( rep.getStepAttributeString( id_step, i, \"field_currency\" ) );\n        outputFields[i].setDecimalSymbol( rep.getStepAttributeString( id_step, i, \"field_decimal\" ) );\n        outputFields[i].setGroupingSymbol( rep.getStepAttributeString( id_step, i, \"field_group\" ) );\n        outputFields[i].setNullString( rep.getStepAttributeString( id_step, i, \"field_nullif\" ) );\n        outputFields[i].setLength( (int) rep.getStepAttributeInteger( id_step, i, \"field_length\" ) );\n        outputFields[i].setPrecision( (int) rep.getStepAttributeInteger( id_step, i, \"field_precision\" ) );\n        outputFields[i].setAttribute( rep.getStepAttributeBoolean( id_step, i, \"field_attribute\" ) );\n        outputFields[i].setAttributeParentName( rep.getStepAttributeString( id_step, i, \"field_attributeName\" ) );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unexpected error reading step information from the repository\", e );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step )\n    throws KettleException {\n    try {\n      rep.saveStepAttribute( id_transformation, id_step, \"encoding\", encoding );\n      rep.saveStepAttribute( id_transformation, id_step, \"valueName\", valueName );\n      rep.saveStepAttribute( id_transformation, id_step, \"xml_repeat_element\", rootNode );\n      rep.saveStepAttribute( id_transformation, id_step, \"omitXMLheader\", omitXMLheader );\n      rep.saveStepAttribute( id_transformation, id_step, \"omitNullValues\", omitNullValues );\n\n      for ( int i = 0; i < outputFields.length; i++ ) {\n        XMLField field = outputFields[i];\n\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_name\", field.getFieldName() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_element\", field.getElementName() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_type\", field.getTypeDesc() );","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/addxml/AddXMLMeta.java#L284-L320","documentation":"AddXMLMeta.readRep loads the step's settings from a repository (database) by calling rep.getStepAttributeInteger/Boolean/String. Any repository exception (connection failure, missing attributes, schema problems) is wrapped in a KettleException with this fixed message; the cause carries repository detail.","triggerScenarios":"readRep queries step attributes for id_step and the repository layer throws — e.g. the r_step_attribute rows are missing/corrupt or the repository connection breaks mid-read.","commonSituations":"Repository database upgraded/downgraded across PDI versions; interrupted metadata save leaving partial attribute rows; network/DB outage during transformation load.","solutions":["Check repository DB connectivity and re-open the transformation","Verify r_step_attribute rows for the step id exist and are intact","Re-save the step in Spoon to rewrite its repository attributes","Check PDI version compatibility with the repository schema"],"exampleFix":"// before\nKettleException ke; logError(ke.getMessage());\n// after\nlogError(\"Repository read failed\", ke); logError(\"Cause:\", ke.getCause()); // then re-save the step","handlingStrategy":"try-catch","validationCode":"if (!repository.connect(login, password)) failFast(\"Repository connection unavailable before loading steps\");","typeGuard":null,"tryCatchPattern":"try { meta.readRep(repo, metaStore, idStep, databases); }\ncatch (KettleException e) {\n  logError(\"Repository read failed for step \" + idStep, e.getCause());\n}","preventionTips":["Verify repository connectivity before batch-loading transformations","Re-save steps after PDI version upgrades","Monitor repository DB health (locks, schema version)"],"tags":["repository","database","step-metadata","kettle"],"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"}