{"record":{"id":"9b6bc222fb95f63b","repo":"pentaho/pentaho-kettle","slug":"mailvalidatormeta-exception-unabletosavestepinfo","errorCode":null,"errorMessage":"MailValidatorMeta.Exception.UnableToSaveStepInfo","messagePattern":"MailValidatorMeta\\.Exception\\.UnableToSaveStepInfo","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":433,"sourceCode":"  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 );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"isdynamicDefaultSMTP\", isdynamicDefaultSMTP );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"MailValidatorMeta.Exception.UnableToSaveStepInfo\" )\n        + id_step, e );\n    }\n  }\n\n  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,\n    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,\n    Repository repository, IMetaStore metaStore ) {\n    CheckResult cr;\n\n    if ( Utils.isEmpty( resultfieldname ) ) {\n      cr =\n        new CheckResult( CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(\n          PKG, \"MailValidatorMeta.CheckResult.ResultFieldMissing\" ), stepMeta );\n    } else {\n      cr =\n        new CheckResult( CheckResult.TYPE_RESULT_OK, BaseMessages.getString(\n          PKG, \"MailValidatorMeta.CheckResult.ResultFieldOk\" ), stepMeta );\n    }","sourceCodeStart":415,"sourceCodeEnd":451,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/mail-validator/impl/src/main/java/org/pentaho/di/trans/steps/mailvalidator/MailValidatorMeta.java#L415-L451","documentation":"Thrown by MailValidatorMeta.saveRep() when persisting the step's attributes to a repository fails. Saving emailSender, defaultSMTPField or isdynamicDefaultSMTP via rep.saveStepAttribute threw; the KettleException message appends the id_step. The step's configuration is not saved when this occurs.","triggerScenarios":"saveRep() during 'Save' of a transformation to a repository: repository connection lost, database read-only, constraint violation, or repository exception while writing step attributes.","commonSituations":"Repository database down or in read-only mode; insufficient DB permissions (INSERT/UPDATE on R_STEP_ATTRIBUTE); disk full on the DB server; saving after the step id became stale.","solutions":["Check the wrapped cause for the underlying JDBC error (connection, permissions, disk full)","Verify the repository DB user has INSERT/UPDATE rights on R_STEP_ATTRIBUTE and that the DB is writable","Reconnect to the repository and re-save the transformation","Save the transformation locally as .ktr as a fallback while repository issues are fixed"],"exampleFix":"// before: saving with a dropped connection\nrepo.save(transMeta, null, null);\n// after: reconnect and retry\ntry { repo.save(transMeta, null, null); }\ncatch (KettleException e) { repo.connect(); repo.save(transMeta, null, null); }","handlingStrategy":"try-catch","validationCode":"// Guard before saving\nif (rep == null || !rep.isConnected()) throw new IllegalStateException('Repository not connected');\nif (idStep == null) throw new IllegalStateException('Step not persisted yet; id_step is null');","typeGuard":"boolean canSave(Repository rep, ObjectId idTrans, ObjectId idStep) {\n  return rep != null && rep.isConnected() && idTrans != null && idStep != null;\n}","tryCatchPattern":"try {\n  meta.saveRep(rep, metaStore, idTrans, idStep);\n} catch (KettleException e) {\n  log.error('Save failed for step ' + idStep + ': ' + e.getCause(), e);\n  // save locally as fallback\n  transMeta.writeXML(new java.io.FileWriter('/tmp/backup.ktr'));\n}","preventionTips":["Confirm DB write permissions for the repository user","Monitor DB disk space before large saves","Reconnect the repository after network interruptions","Keep a local .ktr export as a save fallback"],"tags":["repository","database","persistence"],"backgroundTag":"database-write-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"}