{"record":{"id":"9310dd217cbc68d5","repo":"pentaho/pentaho-kettle","slug":"ldapoutputmeta-exception-errorsavingtorepository","errorCode":"LDAPOutputMeta.Exception.ErrorSavingToRepository","errorMessage":"LDAPOutputMeta.Exception.ErrorSavingToRepository","messagePattern":"LDAPOutputMeta\\.Exception\\.ErrorSavingToRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapoutput/LDAPOutputMeta.java","lineNumber":858,"sourceCode":"      rep.saveStepAttribute( id_transformation, id_step, \"oldDnFieldName\", oldDnFieldName );\n      rep.saveStepAttribute( id_transformation, id_step, \"newDnFieldName\", newDnFieldName );\n      rep.saveStepAttribute( id_transformation, id_step, \"deleteRDN\", deleteRDN );\n\n      for ( int i = 0; i < updateLookup.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_name\", updateLookup[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_attribut\", updateStream[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"value_update\", update[i].booleanValue() );\n\n      }\n      rep.saveStepAttribute( id_transformation, id_step, \"protocol\", protocol );\n      rep.saveStepAttribute( id_transformation, id_step, \"trustStorePath\", trustStorePath );\n      rep.saveStepAttribute( id_transformation, id_step, \"trustStorePassword\", Encr\n        .encryptPasswordIfNotUsingVariables( trustStorePassword ) );\n      rep.saveStepAttribute( id_transformation, id_step, \"trustAllCertificates\", trustAllCertificates );\n      rep.saveStepAttribute( id_transformation, id_step, \"useCertificate\", useCertificate );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"LDAPOutputMeta.Exception.ErrorSavingToRepository\", \"\" + id_step ), e );\n    }\n  }\n\n  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,\n    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,\n    Repository repository, IMetaStore metaStore ) {\n\n    CheckResult cr;\n\n    // See if we get input...\n    if ( input.length > 0 ) {\n      cr =\n        new CheckResult( CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(\n          PKG, \"LDAPOutputMeta.CheckResult.NoInputExpected\" ), stepMeta );\n    } else {\n      cr =\n        new CheckResult( CheckResult.TYPE_RESULT_OK, BaseMessages.getString(","sourceCodeStart":840,"sourceCodeEnd":876,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapoutput/LDAPOutputMeta.java#L840-L876","documentation":"LDAPOutputMeta.saveRep wraps persistence of the step settings in try/catch and rethrows as KettleException with Exception.ErrorSavingToRepository (including the step id). Any rep.saveStepAttribute failure while saving the transformation raises this.","triggerScenarios":"Saving a transformation containing LDAP Output to a repository when the database write fails: connection lost, insufficient privileges, read-only repository, or constraint/size violation on an attribute value.","commonSituations":"Repository DB out of space or locked; user lacks INSERT/UPDATE rights on repository tables; network drop between Spoon and repository DB during save; saving to a deprecated repository type.","solutions":["Test and restore the repository DB connection, then retry the save","Check the repository user's privileges on the R_* repository tables","Check DB disk space and table size limits for long attribute values","Save locally as .ktr as a workaround and re-publish later"],"exampleFix":"// before: save without checking connection state\nrep.saveStepAttribute(id_transformation, id_step, \"useCertificate\", useCertificate);\n// after: reconnect and retry\nif (!rep.isConnected()) { rep.connect(); }\nrep.saveStepAttribute(id_transformation, id_step, \"useCertificate\", useCertificate);","handlingStrategy":"try-catch","validationCode":"// Check write access before saving\nif (!rep.isConnected() || rep.isReadOnly()) {\n  throw new KettleException(\"Repository not writable\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.saveRep(rep, metaStore, transMeta.getObjectId());\n} catch (KettleException e) {\n  logError(\"Repository save failed for step \" + e.getMessage(), e);\n  // save to local .ktr as fallback\n}","preventionTips":["Grant the repository user full rights on R_* tables","Monitor repository DB disk space","Save locally first, then export to repository"],"tags":["repository","database","metadata"],"backgroundTag":"database-write-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"}