{"record":{"id":"45371d81cc69cc40","repo":"pentaho/pentaho-kettle","slug":"ldapinputmeta-unabletoloadfromxml","errorCode":"LDAPInputMeta.UnableToLoadFromXML","errorMessage":"LDAPInputMeta.UnableToLoadFromXML","messagePattern":"LDAPInputMeta\\.UnableToLoadFromXML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapinput/LDAPInputMeta.java","lineNumber":668,"sourceCode":"      multiValuedSeparator = XMLHandler.getTagValue( stepnode, \"multivaluedseparator\" );\n      dynamicSearch = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"dynamicsearch\" ) );\n      dynamicSeachFieldName = XMLHandler.getTagValue( stepnode, \"dynamicseachfieldname\" );\n      dynamicFilter = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"dynamicfilter\" ) );\n      dynamicFilterFieldName = XMLHandler.getTagValue( stepnode, \"dynamicfilterfieldname\" );\n      searchScope =\n        getSearchScopeByCode( Const.NVL(\n          XMLHandler.getTagValue( stepnode, \"searchScope\" ),\n          getSearchScopeCode( LDAPConnection.SEARCH_SCOPE_SUBTREE_SCOPE ) ) );\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, \"LDAPInputMeta.UnableToLoadFromXML\" ), e );\n    }\n  }\n\n  private static int getSearchScopeByCode( String tt ) {\n    if ( tt == null ) {\n      return 0;\n    }\n\n    for ( int i = 0; i < searchScopeCode.length; i++ ) {\n      if ( searchScopeCode[i].equalsIgnoreCase( tt ) ) {\n        return i;\n      }\n    }\n    return 0;\n  }\n\n  public void allocate( int nrfields ) {\n","sourceCodeStart":650,"sourceCodeEnd":686,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapinput/LDAPInputMeta.java#L650-L686","documentation":"LDAPInputMeta.readData(), called from loadXML(), wraps any exception while deserializing the step configuration from the transformation XML into KettleXMLException. It means the <step> node for LDAP Input could not be parsed — a tag was malformed or unexpected. Used when a user opens a .ktr file in Spoon.","triggerScenarios":"loadXML(stepnode, databases, metaStore) encounters an XMLHandler.getTagValue() failure or malformed structure inside the stepnode; e.g. hand-edited ktr, truncated file, or XML written by a newer PDI version with incompatible tags.","commonSituations":"Opening a transformation created in a newer Pentaho version in an older one, corrupted ktr after bad merge/transfer, manual edits that broke the step XML block.","solutions":["Open the .ktr in a text editor and validate the XML around the LDAP Input <step> block; fix malformed tags.","Open the transformation in the same (or newer) PDI version that created it.","Restore the ktr from version control or backup and re-apply changes carefully.","Delete and re-create the LDAP Input step if only that step's XML is corrupt."],"exampleFix":"// before (malformed tag)\n<trustAllCertificate>Y</trustAllCertificate>\n// after\n<trustAllCertificates>Y</trustAllCertificates>","handlingStrategy":"try-catch","validationCode":"// before loading the ktr\ntry { DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File(ktrPath)); } catch (SAXException e) { throw new IllegalStateException(\"ktr XML is malformed: \" + e.getMessage()); }","typeGuard":null,"tryCatchPattern":"try { meta.loadXML(stepnode, databases, metaStore); } catch (KettleXMLException e) { logError(\"Failed to load LDAP Input step XML: \" + e.getCause().getMessage(), e); }","preventionTips":["Never hand-edit ktr XML without validating afterwards","Open transformations with the PDI version that created them","Keep ktr files in version control to recover from corruption"],"tags":["xml","deserialization","metadata"],"backgroundTag":"xml-parse-error","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"}