{"record":{"id":"add63b8aff9fb781","repo":"pentaho/pentaho-kettle","slug":"ldapoutputmeta-unabletoloadfromxml","errorCode":"LDAPOutputMeta.UnableToLoadFromXML","errorMessage":"LDAPOutputMeta.UnableToLoadFromXML","messagePattern":"LDAPOutputMeta\\.UnableToLoadFromXML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapoutput/LDAPOutputMeta.java","lineNumber":742,"sourceCode":"          update[i] = Boolean.TRUE;\n        } else {\n          if ( updateValue.equalsIgnoreCase( \"Y\" ) ) {\n            update[i] = Boolean.TRUE;\n          } else {\n            update[i] = Boolean.FALSE;\n          }\n        }\n      }\n\n      protocol = XMLHandler.getTagValue( stepnode, \"protocol\" );\n      trustStorePath = XMLHandler.getTagValue( stepnode, \"trustStorePath\" );\n      trustStorePassword =\n        Encr.decryptPasswordOptionallyEncrypted( XMLHandler.getTagValue( stepnode, \"trustStorePassword\" ) );\n      trustAllCertificates = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"trustAllCertificates\" ) );\n      useCertificate = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"useCertificate\" ) );\n\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString( PKG, \"LDAPOutputMeta.UnableToLoadFromXML\" ), e );\n    }\n  }\n\n  public void setDefault() {\n    useAuthentication = false;\n    Host = \"\";\n    userName = \"\";\n    password = \"\";\n    port = \"389\";\n    dnFieldName = null;\n    failIfNotExist = true;\n    multiValuedSeparator = \";\";\n    searchBase = null;\n    oldDnFieldName = null;\n    newDnFieldName = null;\n    deleteRDN = true;\n\n    int nrFields = 0;","sourceCodeStart":724,"sourceCodeEnd":760,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapoutput/LDAPOutputMeta.java#L724-L760","documentation":"LDAPOutputMeta.loadXML wraps all XML deserialization of the step settings in a try/catch and rethrows any exception as KettleXMLException with message UnableToLoadFromXML. It means the step's <step> XML node was malformed or contained values that could not be parsed (e.g. bad encrypted password, non-boolean tag).","triggerScenarios":"Loading a .ktr file whose LDAP Output step XML has corrupt/missing tags, an invalid Encr-encrypted trustStorePassword, or values that fail XMLHandler.getTagValue parsing/conversion.","commonSituations":"Hand-edited or truncated transformation file; file produced by a newer/older Pentaho version with incompatible XML schema; corrupted repository export; merge conflicts in VCS-tracked .ktr files.","solutions":["Restore a known-good version of the .ktr file (VCS/backup)","Compare the LDAP Output step XML node against a working transformation and fix malformed tags, especially trustStorePassword and boolean flags ('Y'/'N')","Re-create the LDAP Output step in Spoon and re-enter its settings","Check the Pentaho version compatibility of the file"],"exampleFix":"<!-- before: corrupt password tag -->\n<trustStorePassword>Encr ??corrupt</trustStorePassword>\n<!-- after -->\n<trustStorePassword>Encr 8a1f...</trustStorePassword>","handlingStrategy":"try-catch","validationCode":"// Validate the .ktr XML before loading\nDocument doc = XMLHandler.loadXMLFile(ktrFile);\nif (XMLHandler.getSubNode(doc, \"transformation\") == null) {\n  throw new KettleException(\"Not a valid transformation file\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  TransMeta transMeta = new TransMeta(inputStream, rep, false, variables, null);\n} catch (KettleXMLException e) {\n  logError(\"Corrupt LDAP Output step XML: \" + e.getMessage(), e);\n  // fall back to last-good file or rebuild the step\n}","preventionTips":["Keep .ktr files in version control and validate before committing","Avoid hand-editing XML, especially Encr-encrypted password fields","Match Pentaho versions between authors and executors"],"tags":["xml","deserialization","transformation-metadata"],"backgroundTag":"file-read-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"}