{"record":{"id":"9762290347d45a37","repo":"pentaho/pentaho-kettle","slug":"mailvalidator-error-emailnotvalidmsgmissing","errorCode":null,"errorMessage":"MailValidator.Error.EMailNotValidMsgMissing","messagePattern":"MailValidator\\.Error\\.EMailNotValidMsgMissing","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/mail-validator/impl/src/main/java/org/pentaho/di/trans/steps/mailvalidator/MailValidator.java","lineNumber":82,"sourceCode":"      data.previousRowMeta = getInputRowMeta().clone();\n      data.NrPrevFields = data.previousRowMeta.size();\n      data.outputRowMeta = getInputRowMeta().clone();\n      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n        metaStore );\n\n      // check result fieldname\n      data.realResultFieldName = environmentSubstitute( meta.getResultFieldName() );\n      if ( Utils.isEmpty( data.realResultFieldName ) ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"MailValidator.Error.ResultFieldNameMissing\" ) );\n      }\n\n      if ( meta.isResultAsString() ) {\n        if ( Utils.isEmpty( meta.getEMailValideMsg() ) ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"MailValidator.Error.EMailValidMsgMissing\" ) );\n        }\n\n        if ( Utils.isEmpty( meta.getEMailNotValideMsg() ) ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"MailValidator.Error.EMailNotValidMsgMissing\" ) );\n        }\n\n        data.msgValidMail = environmentSubstitute( meta.getEMailValideMsg() );\n        data.msgNotValidMail = environmentSubstitute( meta.getEMailNotValideMsg() );\n      }\n\n      // Check is email address field is provided\n      if ( Utils.isEmpty( meta.getEmailField() ) ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"MailValidator.Error.FilenameFieldMissing\" ) );\n      }\n\n      data.realResultErrorsFieldName = environmentSubstitute( meta.getErrorsField() );\n\n      // cache the position of the field\n      if ( data.indexOfeMailField < 0 ) {\n        data.indexOfeMailField = data.previousRowMeta.indexOfValue( meta.getEmailField() );\n        if ( data.indexOfeMailField < 0 ) {\n          // The field is unreachable !","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/mail-validator/impl/src/main/java/org/pentaho/di/trans/steps/mailvalidator/MailValidator.java#L64-L100","documentation":"MailValidator.processRow() throws this KettleException when the step returns its result as a string but the 'not valid email message' (EMailNotValideMsg) is empty. That message is written to the result field for failed validations and is required in string-output mode.","triggerScenarios":"Running the Mail Validator step with 'result as string' enabled while the 'not valid email message' field in the dialog is blank (the valid-message check passes but this one fails).","commonSituations":"Configuring only the valid message and forgetting the failure message; step settings partially migrated from boolean-output configuration.","solutions":["Open the Mail Validator step dialog and set the 'not valid email message' (e.g. 'BAD').","Disable 'result as string' if boolean output suffices.","Set it in code: meta.setEMailNotValideMsg(\"BAD\").","Validate both message fields before launching the transformation."],"exampleFix":"// before\nmeta.setEMailValideMsg( \"OK\" );\nmeta.setEMailNotValideMsg( \"\" );\n// after\nmeta.setEMailValideMsg( \"OK\" );\nmeta.setEMailNotValideMsg( \"BAD\" );","handlingStrategy":"validation","validationCode":"if ( meta.isResultAsString()\n    && ( meta.getEMailNotValideMsg() == null || meta.getEMailNotValideMsg().isEmpty() ) ) {\n  meta.setEMailNotValideMsg( \"BAD\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute( null );\n} catch ( KettleException e ) {\n  if ( e.getMessage().contains( \"EMailNotValidMsgMissing\" ) ) {\n    logError( \"Set 'not valid email message' or disable result-as-string\" );\n  }\n  throw e;\n}","preventionTips":["Always pair EMailValideMsg with EMailNotValideMsg in string mode.","Validate step metadata programmatically before execution.","Keep default failure messages in your step factory code.","Check settings after migrating from boolean output mode."],"tags":["configuration","transformation","email-validation"],"backgroundTag":"empty-required-field","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}