{"record":{"id":"c28a0b0de4236cb3","repo":"pentaho/pentaho-kettle","slug":"ldifinputmeta-exception-errorreadingrepository","errorCode":"LDIFInputMeta.Exception.ErrorReadingRepository","errorMessage":"LDIFInputMeta.Exception.ErrorReadingRepository","messagePattern":"LDIFInputMeta\\.Exception\\.ErrorReadingRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/ldifinput/LDIFInputMeta.java","lineNumber":968,"sourceCode":"        field.setGroupSymbol( rep.getStepAttributeString( id_step, i, \"field_group\" ) );\n        field.setLength( (int) rep.getStepAttributeInteger( id_step, i, \"field_length\" ) );\n        field.setPrecision( (int) rep.getStepAttributeInteger( id_step, i, \"field_precision\" ) );\n        field.setTrimType( LDIFInputField.getTrimTypeByCode( rep.getStepAttributeString(\n          id_step, i, \"field_trim_type\" ) ) );\n        field.setRepeated( rep.getStepAttributeBoolean( id_step, i, \"field_repeat\" ) );\n\n        inputFields[i] = field;\n      }\n      shortFileFieldName = rep.getStepAttributeString( id_step, \"shortFileFieldName\" );\n      pathFieldName = rep.getStepAttributeString( id_step, \"pathFieldName\" );\n      hiddenFieldName = rep.getStepAttributeString( id_step, \"hiddenFieldName\" );\n      lastModificationTimeFieldName = rep.getStepAttributeString( id_step, \"lastModificationTimeFieldName\" );\n      rootUriNameFieldName = rep.getStepAttributeString( id_step, \"rootUriNameFieldName\" );\n      extensionFieldName = rep.getStepAttributeString( id_step, \"extensionFieldName\" );\n      sizeFieldName = rep.getStepAttributeString( id_step, \"sizeFieldName\" );\n      uriNameFieldName = rep.getStepAttributeString(  id_step, \"uriNameFieldName\" );\n    } catch ( Exception e ) {\n      throw new KettleException(\n        BaseMessages.getString( PKG, \"LDIFInputMeta.Exception.ErrorReadingRepository\" ), e );\n    }\n  }\n\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, \"filefield\", filefield );\n      rep.saveStepAttribute( id_transformation, id_step, \"dynamicFilenameField\", dynamicFilenameField );\n      rep.saveStepAttribute( id_transformation, id_step, \"include\", includeFilename );\n      rep.saveStepAttribute( id_transformation, id_step, \"include_field\", filenameField );\n      rep.saveStepAttribute( id_transformation, id_step, \"rownum\", includeRowNumber );\n      rep.saveStepAttribute( id_transformation, id_step, \"rownum_field\", rowNumberField );\n      rep.saveStepAttribute( id_transformation, id_step, \"contenttype\", includeContentType );\n      rep.saveStepAttribute( id_transformation, id_step, \"contenttype_field\", contentTypeField );\n      rep.saveStepAttribute( id_transformation, id_step, \"dn_field\", DNField );\n      rep.saveStepAttribute( id_transformation, id_step, \"dn\", includeDN );\n      rep.saveStepAttribute( id_transformation, id_step, \"limit\", rowLimit );\n      rep.saveStepAttribute( id_transformation, id_step, \"addtoresultfilename\", addtoresultfilename );","sourceCodeStart":950,"sourceCodeEnd":986,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/ldifinput/LDIFInputMeta.java#L950-L986","documentation":"LDIFInputMeta.readRep wraps repository deserialization in try/catch and throws KettleException('Error reading step info from repository') when any rep.getStepAttribute* call fails. It occurs while loading the step's settings from a Pentaho Repository database, not from a file.","triggerScenarios":"Loading a transformation stored in a Pentaho Repository where r_step_attribute reads fail — DB connection issues, schema/version mismatch, or corrupt/missing rows for id_step.","commonSituations":"Repository database down or network dropped mid-load; repository schema not upgraded after a Pentaho version upgrade; row corruption or manually deleted attributes.","solutions":["Check repository database connectivity and credentials.","Verify repository schema version matches the Pentaho version (run repository upgrade if needed).","Inspect r_step_attribute rows for the step's id_step; restore from backup if corrupt.","Export the transformation to XML and re-import into a healthy repository."],"exampleFix":"// before\n// repo DB unreachable -> readRep throws\n// after: validate connection before load\nif (!rep.testConnection()) {\n  throw new KettleException(\"Repository unavailable: \" + rep.getName());\n}","handlingStrategy":"try-catch","validationCode":"if (!rep.testConnection()) {\n  throw new KettleException(\"Repository unavailable before loading transformation\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  TransMeta tm = new TransMeta(rep, \"my transform\", null, true, null, null);\n} catch (KettleException e) {\n  log.error(\"Repository read failed; check DB connection/schema version\", e);\n}","preventionTips":["Monitor repository DB availability","Run repository schema upgrades after Pentaho version changes","Export transformations to XML as backups"],"tags":["kettle","pentaho","repository","database","metadata"],"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"}