pentaho/pentaho-kettle · error · KettleXMLException

LDAPOutputMeta.UnableToLoadFromXML

LDAPOutputMeta.UnableToLoadFromXML

Error message

LDAPOutputMeta.UnableToLoadFromXML

What it means

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).

Solutions

  1. Restore a known-good version of the .ktr file (VCS/backup)
  2. Compare the LDAP Output step XML node against a working transformation and fix malformed tags, especially trustStorePassword and boolean flags ('Y'/'N')
  3. Re-create the LDAP Output step in Spoon and re-enter its settings
  4. Check the Pentaho version compatibility of the file

Example fix

<!-- before: corrupt password tag -->
<trustStorePassword>Encr ??corrupt</trustStorePassword>
<!-- after -->
<trustStorePassword>Encr 8a1f...</trustStorePassword>
Defensive patterns

Strategy: try-catch

Validate before calling

// Validate the .ktr XML before loading
Document doc = XMLHandler.loadXMLFile(ktrFile);
if (XMLHandler.getSubNode(doc, "transformation") == null) {
  throw new KettleException("Not a valid transformation file");
}

Try / catch

try {
  TransMeta transMeta = new TransMeta(inputStream, rep, false, variables, null);
} catch (KettleXMLException e) {
  logError("Corrupt LDAP Output step XML: " + e.getMessage(), e);
  // fall back to last-good file or rebuild the step
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/add63b8aff9fb781. Report an issue: GitHub.

Appendix: source

Thrown at plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapoutput/LDAPOutputMeta.java:742

          update[i] = Boolean.TRUE;
        } else {
          if ( updateValue.equalsIgnoreCase( "Y" ) ) {
            update[i] = Boolean.TRUE;
          } else {
            update[i] = Boolean.FALSE;
          }
        }
      }

      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, "LDAPOutputMeta.UnableToLoadFromXML" ), e );
    }
  }

  public void setDefault() {
    useAuthentication = false;
    Host = "";
    userName = "";
    password = "";
    port = "389";
    dnFieldName = null;
    failIfNotExist = true;
    multiValuedSeparator = ";";
    searchBase = null;
    oldDnFieldName = null;
    newDnFieldName = null;
    deleteRDN = true;

    int nrFields = 0;

View on GitHub (pinned to f3058517a1)