{"record":{"id":"819d9ecc7b3bad95","repo":"pentaho/pentaho-kettle","slug":"mailvalidatormeta-exception-unabletoreadstepinfo","errorCode":null,"errorMessage":"MailValidatorMeta.Exception.UnableToReadStepInfo","messagePattern":"MailValidatorMeta\\.Exception\\.UnableToReadStepInfo","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"plugins/mail-validator/impl/src/main/java/org/pentaho/di/trans/steps/mailvalidator/MailValidatorMeta.java","lineNumber":387,"sourceCode":"  private void readData( Node stepnode ) throws KettleXMLException {\n    try {\n      emailfield = XMLHandler.getTagValue( stepnode, \"emailfield\" );\n      resultfieldname = XMLHandler.getTagValue( stepnode, \"resultfieldname\" );\n      ResultAsString = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"ResultAsString\" ) );\n      smtpCheck = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"smtpCheck\" ) );\n\n      emailValideMsg = XMLHandler.getTagValue( stepnode, \"emailValideMsg\" );\n      emailNotValideMsg = XMLHandler.getTagValue( stepnode, \"emailNotValideMsg\" );\n      errorsFieldName = XMLHandler.getTagValue( stepnode, \"errorsFieldName\" );\n      timeout = XMLHandler.getTagValue( stepnode, \"timeout\" );\n      defaultSMTP = XMLHandler.getTagValue( stepnode, \"defaultSMTP\" );\n      emailSender = XMLHandler.getTagValue( stepnode, \"emailSender\" );\n      defaultSMTPField = XMLHandler.getTagValue( stepnode, \"defaultSMTPField\" );\n\n      isdynamicDefaultSMTP = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"isdynamicDefaultSMTP\" ) );\n\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString(\n        PKG, \"MailValidatorMeta.Exception.UnableToReadStepInfo\" ), e );\n    }\n  }\n\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {\n    try {\n      emailfield = rep.getStepAttributeString( id_step, \"emailfield\" );\n      resultfieldname = rep.getStepAttributeString( id_step, \"resultfieldname\" );\n      ResultAsString = rep.getStepAttributeBoolean( id_step, \"ResultAsString\" );\n      smtpCheck = rep.getStepAttributeBoolean( id_step, \"smtpCheck\" );\n\n      emailValideMsg = rep.getStepAttributeString( id_step, \"emailValideMsg\" );\n      emailNotValideMsg = rep.getStepAttributeString( id_step, \"emailNotValideMsg\" );\n      errorsFieldName = rep.getStepAttributeString( id_step, \"errorsFieldName\" );\n      timeout = rep.getStepAttributeString( id_step, \"timeout\" );\n      defaultSMTP = rep.getStepAttributeString( id_step, \"defaultSMTP\" );\n      emailSender = rep.getStepAttributeString( id_step, \"emailSender\" );\n      defaultSMTPField = rep.getStepAttributeString( id_step, \"defaultSMTPField\" );","sourceCodeStart":369,"sourceCodeEnd":405,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/mail-validator/impl/src/main/java/org/pentaho/di/trans/steps/mailvalidator/MailValidatorMeta.java#L369-L405","documentation":"Thrown by MailValidatorMeta.readData() when parsing the step's XML definition fails. This step metadata loader reads attributes (emailSender, defaultSMTPField, isdynamicDefaultSMTP) from the transformation XML via XMLHandler; any exception while reading those tags is wrapped in a KettleXMLException so callers know the step could not be deserialized. It is a serialization/deserialization error, not a runtime mail error.","triggerScenarios":"loadXML() calls readData() with a stepnode element that is malformed, missing required tags, or whose child elements cannot be parsed by XMLHandler.getTagValue; an underlying exception (e.g. DOM/NPE) is raised inside the try block.","commonSituations":"Hand-edited or corrupted .ktr files; transformations written by a newer/older Pentaho version with different XML schema; truncated XML files; XML where the mail-validator step node has invalid nested elements.","solutions":["Open the .ktr in a text editor and verify the mail-validator step's XML node is well-formed and contains emailSender/defaultSMTPField/isdynamicDefaultSMTP tags","Recreate the Mail Validator step in Spoon and re-save the transformation to regenerate valid XML","Check Pentaho/PDI version compatibility between the file and the plugins/mail-validator plugin","Enable Kettle debug logging to see the wrapped cause (e) of the KettleXMLException"],"exampleFix":"// before: hand-edited broken node\n<step name='Mail Validator'><emailSender>no closing tag\n// after: valid node\n<step name='Mail Validator'><emailSender>sender@example.com</emailSender><defaultSMTPField></defaultSMTPField><isdynamicDefaultSMTP>N</isdynamicDefaultSMTP></step>","handlingStrategy":"validation","validationCode":"// Validate the ktr XML before loading\njavax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder()\n  .parse(new java.io.File('trans.ktr')); // throws if malformed\n// then check the step node exists\n// NodeList steps = doc.getElementsByTagName(\"step\"); ensure mail-validator fields present","typeGuard":"boolean hasMailValidatorFields(org.w3c.dom.Element step) {\n  return step != null && step.getElementsByTagName(\"emailSender\").getLength() > 0;\n}","tryCatchPattern":"try {\n  transMeta = new TransMeta('trans.ktr');\n} catch (KettleXMLException e) {\n  log.error('Corrupt step XML in trans.ktr: ' + e.getCause(), e);\n  throw new IllegalStateException('Fix or recreate the mail-validator step XML', e);\n}","preventionTips":["Never hand-edit .ktr XML; edit in Spoon only","Pin the same PDI/plugin version for authoring and execution","Keep .ktr files in version control to detect corruption/diff regressions","Log e.getCause() to see the real parse error"],"tags":["xml","deserialization","pdi-step-meta"],"backgroundTag":"schema-validation-failed","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"}