pentaho/pentaho-kettle · error · KettleXMLException
LDAPInputMeta.UnableToLoadFromXML
LDAPInputMeta.UnableToLoadFromXML
Error message
LDAPInputMeta.UnableToLoadFromXML
What it means
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.
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.
Example fix
// before (malformed tag) <trustAllCertificate>Y</trustAllCertificate> // after <trustAllCertificates>Y</trustAllCertificates>
Defensive patterns
Strategy: try-catch
Validate before calling
// before loading the ktr
try { DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File(ktrPath)); } catch (SAXException e) { throw new IllegalStateException("ktr XML is malformed: " + e.getMessage()); } Try / catch
try { meta.loadXML(stepnode, databases, metaStore); } catch (KettleXMLException e) { logError("Failed to load LDAP Input step XML: " + e.getCause().getMessage(), e); } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- GetTableNamesMeta.Exception.UnableToReadStepInfo
- GPBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML
- GPLoadMeta.Exception.UnableToReadStepInfoFromXML
- JobEntryMailValidator.Meta.UnableToLoadFromXML
- MappingMeta.Exception.ErrorLoadingTransformationStepFromXML
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/45371d81cc69cc40.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapinput/LDAPInputMeta.java:668
multiValuedSeparator = XMLHandler.getTagValue( stepnode, "multivaluedseparator" );
dynamicSearch = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "dynamicsearch" ) );
dynamicSeachFieldName = XMLHandler.getTagValue( stepnode, "dynamicseachfieldname" );
dynamicFilter = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "dynamicfilter" ) );
dynamicFilterFieldName = XMLHandler.getTagValue( stepnode, "dynamicfilterfieldname" );
searchScope =
getSearchScopeByCode( Const.NVL(
XMLHandler.getTagValue( stepnode, "searchScope" ),
getSearchScopeCode( LDAPConnection.SEARCH_SCOPE_SUBTREE_SCOPE ) ) );
protocol = XMLHandler.getTagValue( stepnode, "protocol" );
trustStorePath = XMLHandler.getTagValue( stepnode, "trustStorePath" );
trustStorePassword =
Encr.decryptPasswordOptionallyEncrypted( XMLHandler.getTagValue( stepnode, "trustStorePassword" ) );
trustAllCertificates = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "trustAllCertificates" ) );
useCertificate = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "useCertificate" ) );
} catch ( Exception e ) {
throw new KettleXMLException( BaseMessages.getString( PKG, "LDAPInputMeta.UnableToLoadFromXML" ), e );
}
}
private static int getSearchScopeByCode( String tt ) {
if ( tt == null ) {
return 0;
}
for ( int i = 0; i < searchScopeCode.length; i++ ) {
if ( searchScopeCode[i].equalsIgnoreCase( tt ) ) {
return i;
}
}
return 0;
}
public void allocate( int nrfields ) {
View on GitHub (pinned to f3058517a1)