pentaho/pentaho-kettle · error · KettleException

MailValidator.Error.FilenameFieldMissing

Error message

MailValidator.Error.FilenameFieldMissing

What it means

MailValidator.processRow() throws this KettleException (misleadingly keyed 'FilenameFieldMissing' for historical reasons) when no input field containing the email address to validate is configured. The step needs to know which incoming field holds the address.

Solutions

  1. Open the Mail Validator step dialog and select the input field that contains the email address.
  2. Ensure the upstream step actually outputs a field with the expected name.
  3. Set it in code: meta.setEmailField("email").
  4. Preview the upstream step's output to confirm field names before configuring.

Example fix

// before
meta.setEmailField( "" );
// after
meta.setEmailField( "email" );
Defensive patterns

Strategy: validation

Validate before calling

// Confirm the email field exists in the upstream output before executing
if ( meta.getEmailField() == null || meta.getEmailField().isEmpty() ) {
  throw new IllegalArgumentException( "Mail Validator email field must be set" );
}
if ( previousRowMeta.indexOfValue( meta.getEmailField() ) < 0 ) {
  throw new IllegalArgumentException( "Field not in stream: " + meta.getEmailField() );
}

Try / catch

try {
  trans.execute( null );
} catch ( KettleException e ) {
  if ( e.getMessage().contains( "FilenameFieldMissing" ) ) {
    logError( "Configure the email field on the Mail Validator step" );
  }
  throw e;
}

Prevention

When it happens

Trigger: Running the transformation with the Mail Validator step's 'email field' setting empty.

Common situations: Upstream step renamed/removed the field and the setting was cleared; step configured programmatically without setEmailField(); copy-paste of step without reconfiguring.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at plugins/mail-validator/impl/src/main/java/org/pentaho/di/trans/steps/mailvalidator/MailValidator.java:91

        throw new KettleException( BaseMessages.getString( PKG, "MailValidator.Error.ResultFieldNameMissing" ) );
      }

      if ( meta.isResultAsString() ) {
        if ( Utils.isEmpty( meta.getEMailValideMsg() ) ) {
          throw new KettleException( BaseMessages.getString( PKG, "MailValidator.Error.EMailValidMsgMissing" ) );
        }

        if ( Utils.isEmpty( meta.getEMailNotValideMsg() ) ) {
          throw new KettleException( BaseMessages.getString( PKG, "MailValidator.Error.EMailNotValidMsgMissing" ) );
        }

        data.msgValidMail = environmentSubstitute( meta.getEMailValideMsg() );
        data.msgNotValidMail = environmentSubstitute( meta.getEMailNotValideMsg() );
      }

      // Check is email address field is provided
      if ( Utils.isEmpty( meta.getEmailField() ) ) {
        throw new KettleException( BaseMessages.getString( PKG, "MailValidator.Error.FilenameFieldMissing" ) );
      }

      data.realResultErrorsFieldName = environmentSubstitute( meta.getErrorsField() );

      // cache the position of the field
      if ( data.indexOfeMailField < 0 ) {
        data.indexOfeMailField = data.previousRowMeta.indexOfValue( meta.getEmailField() );
        if ( data.indexOfeMailField < 0 ) {
          // The field is unreachable !
          throw new KettleException( BaseMessages.getString(
            PKG, "MailValidator.Exception.CouldnotFindField", meta.getEmailField() ) );
        }
      }

      // SMTP check?
      if ( meta.isSMTPCheck() ) {
        if ( meta.isdynamicDefaultSMTP() ) {
          if ( Utils.isEmpty( meta.getDefaultSMTP() ) ) {

View on GitHub (pinned to f3058517a1)