pentaho/pentaho-kettle · error · KettleException

MailValidator.Error.EMailValidMsgMissing

Error message

MailValidator.Error.EMailValidMsgMissing

What it means

MailValidator.processRow() throws this KettleException when the step is configured to return its result as a string but the 'valid email message' (EMailValideMsg) is empty. This message is the value written to the result field when the address validates, so it is mandatory in string-result mode.

Solutions

  1. Open the Mail Validator step dialog and enter a value for the 'valid email message' (e.g. 'OK').
  2. Disable 'result as string' if you only need a boolean result field.
  3. Set it in code: meta.setEMailValideMsg("OK").
  4. Also verify the corresponding 'not valid' message is set (its check follows immediately).

Example fix

// before
meta.setResultAsString( true );
meta.setEMailValideMsg( "" );
// after
meta.setResultAsString( true );
meta.setEMailValideMsg( "OK" );
meta.setEMailNotValideMsg( "BAD" );
Defensive patterns

Strategy: validation

Validate before calling

if ( meta.isResultAsString()
    && ( meta.getEMailValideMsg() == null || meta.getEMailValideMsg().isEmpty() ) ) {
  meta.setEMailValideMsg( "OK" );
}

Try / catch

try {
  trans.execute( null );
} catch ( KettleException e ) {
  if ( e.getMessage().contains( "EMailValidMsgMissing" ) ) {
    logError( "Set 'valid email message' or disable result-as-string" );
  }
  throw e;
}

Prevention

When it happens

Trigger: Running the Mail Validator step with 'result as string' enabled while the 'valid email message' field in the step dialog is blank.

Common situations: Switching the step from boolean output to string output without filling in the new message fields; copying a step configuration between transformations; missing default value after an upgrade of the plugin.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


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

Appendix: source

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

    if ( first ) {
      first = false;

      // get the RowMeta
      data.previousRowMeta = getInputRowMeta().clone();
      data.NrPrevFields = data.previousRowMeta.size();
      data.outputRowMeta = getInputRowMeta().clone();
      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,
        metaStore );

      // check result fieldname
      data.realResultFieldName = environmentSubstitute( meta.getResultFieldName() );
      if ( Utils.isEmpty( data.realResultFieldName ) ) {
        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

View on GitHub (pinned to f3058517a1)