{"record":{"id":"de134e54c6131145","repo":"pentaho/pentaho-kettle","slug":"ldapoutputmeta-exception-errorreadingrepository","errorCode":"LDAPOutputMeta.Exception.ErrorReadingRepository","errorMessage":"LDAPOutputMeta.Exception.ErrorReadingRepository","messagePattern":"LDAPOutputMeta\\.Exception\\.ErrorReadingRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapoutput/LDAPOutputMeta.java","lineNumber":817,"sourceCode":"      deleteRDN = rep.getStepAttributeBoolean( id_step, \"deleteRDN\" );\n\n      int nrFields = rep.countNrStepAttributes( id_step, \"field_name\" );\n      allocate( nrFields );\n\n      for ( int i = 0; i < nrFields; i++ ) {\n        updateLookup[i] = rep.getStepAttributeString( id_step, i, \"field_name\" );\n        updateStream[i] = rep.getStepAttributeString( id_step, i, \"field_attribut\" );\n        update[i] = Boolean.valueOf( rep.getStepAttributeBoolean( id_step, i, \"value_update\", true ) );\n      }\n      protocol = rep.getStepAttributeString( id_step, \"protocol\" );\n      trustStorePath = rep.getStepAttributeString( id_step, \"trustStorePath\" );\n      trustStorePassword =\n        Encr.decryptPasswordOptionallyEncrypted( rep.getStepAttributeString( id_step, \"trustStorePassword\" ) );\n      trustAllCertificates = rep.getStepAttributeBoolean( id_step, \"trustAllCertificates\" );\n      useCertificate = rep.getStepAttributeBoolean( id_step, \"useCertificate\" );\n\n    } catch ( Exception e ) {\n      throw new KettleException(\n        BaseMessages.getString( PKG, \"LDAPOutputMeta.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, \"useauthentication\", useAuthentication );\n      rep.saveStepAttribute( id_transformation, id_step, \"host\", Host );\n      rep.saveStepAttribute( id_transformation, id_step, \"username\", userName );\n      rep.saveStepAttribute( id_transformation, id_step, \"password\", Encr\n        .encryptPasswordIfNotUsingVariables( password ) );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"port\", port );\n      rep.saveStepAttribute( id_transformation, id_step, \"dnFieldName\", dnFieldName );\n      rep.saveStepAttribute( id_transformation, id_step, \"failIfNotExist\", failIfNotExist );\n      rep.saveStepAttribute( id_transformation, id_step, \"operationType\", getOperationTypeCode( operationType ) );\n      rep.saveStepAttribute( id_transformation, id_step, \"multivaluedseparator\", multiValuedSeparator );\n      rep.saveStepAttribute( id_transformation, id_step, \"searchBase\", searchBase );","sourceCodeStart":799,"sourceCodeEnd":835,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapoutput/LDAPOutputMeta.java#L799-L835","documentation":"LDAPOutputMeta.readRep wraps repository deserialization in try/catch and rethrows any failure as KettleException with Exception.ErrorReadingRepository. It indicates an error while reading the step's attributes from the Pentaho repository database.","triggerScenarios":"Loading an LDAP Output step's settings via rep.getStepAttributeString/getStepAttributeBoolean when the repository connection fails, the step row is missing, or a stored value (e.g. encrypted trustStorePassword) cannot be decrypted.","commonSituations":"Repository database unreachable or dropped mid-load; step metadata deleted/renamed in the repository; corrupted stored password from a different encryption setup; repository schema mismatch after Pentaho upgrade.","solutions":["Verify the repository connection (test login, network, DB up)","Re-save the step in Spoon to rewrite its repository attributes","Check repository schema version matches your Pentaho version and run upgrade scripts if needed","Re-enter the LDAP Output settings if specific attributes are corrupted"],"exampleFix":"// before\nrep.getStepAttributeString(id_step, \"trustStorePassword\") // throws: repo down\n// after: ensure connection first\nif (rep.connect(...)) { rep.getStepAttributeString(id_step, \"trustStorePassword\"); }","handlingStrategy":"try-catch","validationCode":"// Verify repository reachability before loading metadata\nif (!rep.testConnection().isSuccess()) {\n  throw new KettleException(\"Repository unavailable: \" + rep.testConnection().getError());\n}","typeGuard":null,"tryCatchPattern":"try {\n  stepMeta.readRep(rep, metaStore, idStep, databases);\n} catch (KettleException e) {\n  logError(\"Failed reading LDAP Output metadata from repository: \" + e.getMessage(), e);\n  // retry connection or rebuild the step\n}","preventionTips":["Test repository connection before opening transformations","Run repository upgrade scripts after Pentaho upgrades","Back up the repository database regularly"],"tags":["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"}