pentaho/pentaho-kettle · error · KettleXMLException

JobEntryMailValidator.Meta.UnableToLoadFromXML

Error message

JobEntryMailValidator.Meta.UnableToLoadFromXML

What it means

JobEntryMailValidator.loadXML catches any Exception while reading the entry's tags (timeout, defaultSMTP, emailSender, emailAddress) and wraps it in KettleXMLException with message key JobEntryMailValidator.Meta.UnableToLoadFromXML. The mail validator job entry could not be deserialized from XML.

Solutions

  1. Inspect the chained cause in KettleXMLException to identify the failing tag.
  2. Open the job in Spoon and re-save the Mail Validator entry to regenerate valid XML.
  3. Restore the .kjb from version control if hand-edited or truncated.
  4. Align PDI versions if the file originated from a different release.
Defensive patterns

Strategy: validation

Validate before calling

Document doc = XMLHandler.loadXMLFile(new File(jobFile));
Node entry = doc == null ? null : XMLHandler.getSubNode(doc, "entry");
if (entry == null) {
  throw new KettleException("Job XML does not contain a valid entry node for Mail Validator.");
}

Try / catch

try { loadXML(entrynode, ...); } catch (KettleXMLException e) {
  logError("Mail Validator entry XML unreadable; re-save the job in Spoon: " + e.getMessage(), e);
}

Prevention

When it happens

Trigger: loadXML encounters a malformed or unexpected XML structure for the entrynode, or XMLHandler throws while resolving tags in the .kjb.

Common situations: Hand-edited job XML with missing/malformed tags; files saved by a different PDI version; corrupted/truncated .kjb from a bad merge or transfer.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at plugins/mail-validator/impl/src/main/java/org/pentaho/di/job/entries/mailvalidator/JobEntryMailValidator.java:169

    retval.append( "      " ).append( XMLHandler.addTagValue( "emailAddress", emailAddress ) );

    retval.append( super.getXML() );

    return retval.toString();
  }

  public void loadXML( Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers,
    Repository rep, IMetaStore metaStore ) throws KettleXMLException {
    try {
      super.loadXML( entrynode, databases, slaveServers );
      smtpCheck = "Y".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, "smtpCheck" ) );
      timeout = XMLHandler.getTagValue( entrynode, "timeout" );
      defaultSMTP = XMLHandler.getTagValue( entrynode, "defaultSMTP" );
      emailSender = XMLHandler.getTagValue( entrynode, "emailSender" );
      emailAddress = XMLHandler.getTagValue( entrynode, "emailAddress" );

    } catch ( Exception e ) {
      throw new KettleXMLException(
        BaseMessages.getString( PKG, "JobEntryMailValidator.Meta.UnableToLoadFromXML" ), e );
    }
  }

  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
    List<SlaveServer> slaveServers ) throws KettleException {
    try {
      smtpCheck = rep.getJobEntryAttributeBoolean( id_jobentry, "smtpCheck" );
      timeout = rep.getJobEntryAttributeString( id_jobentry, "timeout" );
      defaultSMTP = rep.getJobEntryAttributeString( id_jobentry, "defaultSMTP" );
      emailSender = rep.getJobEntryAttributeString( id_jobentry, "emailSender" );
      emailAddress = rep.getJobEntryAttributeString( id_jobentry, "emailAddress" );
    } catch ( KettleDatabaseException dbe ) {
      throw new KettleException( BaseMessages.getString( PKG, "JobEntryMailValidator.Meta.UnableToLoadFromRep" )
        + id_jobentry, dbe );
    }
  }

View on GitHub (pinned to f3058517a1)