{"record":{"id":"fc52b8c84aecff09","repo":"pentaho/pentaho-kettle","slug":"mailvalidatormeta-exception-unexpectederrorreadingstepinfo","errorCode":null,"errorMessage":"MailValidatorMeta.Exception.UnexpectedErrorReadingStepInfo","messagePattern":"MailValidatorMeta\\.Exception\\.UnexpectedErrorReadingStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/mail-validator/impl/src/main/java/org/pentaho/di/trans/steps/mailvalidator/MailValidatorMeta.java","lineNumber":410,"sourceCode":"  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\" );\n\n      isdynamicDefaultSMTP = rep.getStepAttributeBoolean( id_step, \"isdynamicDefaultSMTP\" );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"MailValidatorMeta.Exception.UnexpectedErrorReadingStepInfo\" ), e );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      rep.saveStepAttribute( id_transformation, id_step, \"emailfield\", emailfield );\n      rep.saveStepAttribute( id_transformation, id_step, \"resultfieldname\", resultfieldname );\n      rep.saveStepAttribute( id_transformation, id_step, \"ResultAsString\", ResultAsString );\n      rep.saveStepAttribute( id_transformation, id_step, \"smtpCheck\", smtpCheck );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"emailValideMsg\", emailValideMsg );\n      rep.saveStepAttribute( id_transformation, id_step, \"emailNotValideMsg\", emailNotValideMsg );\n      rep.saveStepAttribute( id_transformation, id_step, \"errorsFieldName\", errorsFieldName );\n      rep.saveStepAttribute( id_transformation, id_step, \"timeout\", timeout );\n      rep.saveStepAttribute( id_transformation, id_step, \"defaultSMTP\", defaultSMTP );\n      rep.saveStepAttribute( id_transformation, id_step, \"emailSender\", emailSender );\n      rep.saveStepAttribute( id_transformation, id_step, \"defaultSMTPField\", defaultSMTPField );","sourceCodeStart":392,"sourceCodeEnd":428,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/mail-validator/impl/src/main/java/org/pentaho/di/trans/steps/mailvalidator/MailValidatorMeta.java#L392-L428","documentation":"Thrown by MailValidatorMeta.readRep() when reading the step's attributes from a repository fails. It loads emailSender, defaultSMTPField and isdynamicDefaultSMTP via rep.getStepAttributeString/Boolean; any repository exception is wrapped in a KettleException with this message. It indicates the step metadata could not be loaded from the repository database.","triggerScenarios":"loadRep() on a step whose repository row/attributes are missing, corrupt, or unreachable: repository connection failure, deleted step attributes, or a repository schema mismatch raises inside the try block.","commonSituations":"Repository database down or network dropped mid-load; attributes deleted manually from R_STEP_ATTRIBUTE; loading a transformation saved by an incompatible PDI version; broken repository connection settings.","solutions":["Verify repository connectivity (test the repository connection in Spoon) and retry loading the transformation","Inspect R_STEP_ATTRIBUTE for the id_step rows of this step; recreate the step if attributes are missing","Check the wrapped cause (e) in the KettleException log for the actual JDBC/repository error","Upgrade or repair the repository schema (e.g. via the repository upgrade tool) if versions mismatch"],"exampleFix":"// before: loading from a stale repository connection\ntransMeta = TransMetaFactory.loadTransformation(repo, 'trans', null, true, null);\n// after: ensure repository is connected first\nif (!repo.isConnected()) { repo.connect(); }\ntransMeta = TransMetaFactory.loadTransformation(repo, 'trans', null, true, null);","handlingStrategy":"try-catch","validationCode":"// Before loading, verify repository reachability\nif (!repository.isConnected()) throw new IllegalStateException('Repository not connected');\n// and that the step exists\nStepMeta sm = transMeta.findStep('Mail Validator');\nif (sm == null) throw new IllegalStateException('Step missing from transformation');","typeGuard":"boolean stepLoadable(Repository rep, ObjectId idStep) {\n  try { return rep != null && rep.isConnected() && idStep != null; }\n  catch (Exception e) { return false; }\n}","tryCatchPattern":"try {\n  meta.readRep(rep, metaStore, idStep, databases);\n} catch (KettleException e) {\n  log.error('Repo read failed for step ' + idStep + ': ' + e.getCause(), e);\n  // fall back to defaults or re-create the step\n}","preventionTips":["Test repository connectivity before batch loads","Do not delete R_STEP_ATTRIBUTE rows manually","Keep repository schema in sync with the PDI version","Always inspect the wrapped cause for the real JDBC error"],"tags":["repository","database","pdi-step-meta"],"backgroundTag":"database-query-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"}