{"record":{"id":"7d25781282f4666b","repo":"pentaho/pentaho-kettle","slug":"loadfileinputmeta-exception-errorreadingrepository","errorCode":"LoadFileInputMeta.Exception.ErrorReadingRepository","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/loadfileinput/LoadFileInputMeta.java","lineNumber":923,"sourceCode":"        field.setTrimType( LoadFileInputField.getTrimTypeByCode( rep.getStepAttributeString( idStep, i,\n            FIELD_TRIM_TYPE_REP ) ) );\n        field.setRepeated( rep.getStepAttributeBoolean( idStep, i, FIELD_REPEAT_REP ) );\n\n        inputFields[i] = field;\n      }\n      fileInField = rep.getStepAttributeBoolean( idStep, IS_IN_FIELDS );\n\n      dynamicFilenameField = rep.getStepAttributeString( idStep, DYNAMIC_FILENAME_FIELD );\n      shortFileFieldName = rep.getStepAttributeString( idStep, SHORT_FILE_FIELD_NAME );\n      pathFieldName = rep.getStepAttributeString( idStep, PATH_FIELD_NAME );\n      hiddenFieldName = rep.getStepAttributeString( idStep, HIDDEN_FIELD_NAME );\n      lastModificationTimeFieldName = rep.getStepAttributeString( idStep, LAST_MODIFICATION_TIME_FIELD_NAME );\n      rootUriNameFieldName = rep.getStepAttributeString( idStep, ROOT_URI_NAME_FIELD_NAME );\n      uriNameFieldName = rep.getStepAttributeString(  idStep, URI_NAME_FIELD_NAME );\n      extensionFieldName = rep.getStepAttributeString( idStep, EXTENSION_FIELD_NAME );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG,\n              \"LoadFileInputMeta.Exception.ErrorReadingRepository\" ), e );\n    }\n  }\n\n  @Override\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId idTransformation, ObjectId idStep ) throws KettleException {\n    try {\n      rep.saveStepAttribute( idTransformation, idStep, INCLUDE, includeFilename );\n      rep.saveStepAttribute( idTransformation, idStep, INCLUDE_FIELD, filenameField );\n      rep.saveStepAttribute( idTransformation, idStep, ADDRESULTFILE, addResultFile );\n      rep.saveStepAttribute( idTransformation, idStep, IS_IGNORE_EMPTY_FILE, isIgnoreEmptyFile );\n      rep.saveStepAttribute( idTransformation, idStep, IS_IGNORE_MISSING_PATH, isIgnoreMissingPath );\n\n      rep.saveStepAttribute( idTransformation, idStep, ROWNUM, includeRowNumber );\n      rep.saveStepAttribute( idTransformation, idStep, ROWNUM_FIELD, rowNumberField );\n      rep.saveStepAttribute( idTransformation, idStep, LIMIT, rowLimit );\n      rep.saveStepAttribute( idTransformation, idStep, ENCODING, encoding );\n","sourceCodeStart":905,"sourceCodeEnd":941,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/loadfileinput/LoadFileInputMeta.java#L905-L941","documentation":"Thrown from LoadFileInputMeta.readRep when loading step settings from a Kettle repository. Any Exception from rep.getStepAttributeString(...) or related repository calls is wrapped in a KettleException with message key LoadFileInputMeta.Exception.ErrorReadingRepository and the generic text 'Unexpected error reading step information from the repository'. It indicates repository persistence layer failure while deserializing the step metadata.","triggerScenarios":"Opening a transformation stored in a Kettle repository (DB or file repository) whose r_step_attribute rows cannot be read: repository database down/unreachable, connection dropped mid-read, schema mismatch (missing attribute table/columns), or a corrupted repository entry.","commonSituations":"Repository database upgraded/restored inconsistently; network blip between PDI and the repository DB; wrong repository credentials/instance; using a repository created by a much older Pentaho version.","solutions":["Check the wrapped cause — usually a SQLException; verify the repository database is reachable and credentials are valid.","Test repository connection in Spoon (Tools > Repository > Connect) and retry.","Verify the repository schema is up to date for your PDI version (run the upgrade SQL scripts).","Export the transformation to XML from a working client and import into a fresh repository entry as a workaround."],"exampleFix":"// before\n// kettle.properties points at stale repo host -> readRep fails\n// after\n// fix repositories.xml / connection settings so the repository DB host:port is correct, then reopen the transformation","handlingStrategy":"retry","validationCode":"// Before opening the transformation, verify repository connectivity:\nRepository repo = KettleEnvironment.loadRepository(...);\nif (!repo.isConnected() && !repo.connect(...)) throw new IllegalStateException(\"Repository unreachable\");","typeGuard":null,"tryCatchPattern":"try {\n  loadTransformationFromRepository();\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"ErrorReadingRepository\")) {\n    log.error(\"Repository read failed: \" + e.getCause(), e);\n    // retry with backoff; verify DB connection/schema before retrying\n  } else { throw e; }\n}","preventionTips":["Validate repository connection settings and credentials before opening transformations.","Keep the repository schema upgraded to match your PDI version.","Monitor repository DB availability from the ETL server.","Export critical transformations to .ktr XML as offline backups."],"tags":["repository","database","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"}