{"record":{"id":"cf933e446f0e6f66","repo":"pentaho/pentaho-kettle","slug":"jobentrymailvalidator-meta-unabletoloadfromrep","errorCode":null,"errorMessage":"JobEntryMailValidator.Meta.UnableToLoadFromRep","messagePattern":"JobEntryMailValidator\\.Meta\\.UnableToLoadFromRep","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/mail-validator/impl/src/main/java/org/pentaho/di/job/entries/mailvalidator/JobEntryMailValidator.java","lineNumber":183,"sourceCode":"      emailSender = XMLHandler.getTagValue( entrynode, \"emailSender\" );\n      emailAddress = XMLHandler.getTagValue( entrynode, \"emailAddress\" );\n\n    } catch ( Exception e ) {\n      throw new KettleXMLException(\n        BaseMessages.getString( PKG, \"JobEntryMailValidator.Meta.UnableToLoadFromXML\" ), e );\n    }\n  }\n\n  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,\n    List<SlaveServer> slaveServers ) throws KettleException {\n    try {\n      smtpCheck = rep.getJobEntryAttributeBoolean( id_jobentry, \"smtpCheck\" );\n      timeout = rep.getJobEntryAttributeString( id_jobentry, \"timeout\" );\n      defaultSMTP = rep.getJobEntryAttributeString( id_jobentry, \"defaultSMTP\" );\n      emailSender = rep.getJobEntryAttributeString( id_jobentry, \"emailSender\" );\n      emailAddress = rep.getJobEntryAttributeString( id_jobentry, \"emailAddress\" );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobEntryMailValidator.Meta.UnableToLoadFromRep\" )\n        + id_jobentry, dbe );\n    }\n  }\n\n  // Save the attributes of this job entry\n  //\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {\n    try {\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"smtpCheck\", smtpCheck );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"timeout\", timeout );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"defaultSMTP\", defaultSMTP );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"emailSender\", emailSender );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"emailAddress\", emailAddress );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobEntryMailValidator.Meta.UnableToSaveToRep\" )\n        + id_job, dbe );\n    }\n  }","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/mail-validator/impl/src/main/java/org/pentaho/di/job/entries/mailvalidator/JobEntryMailValidator.java#L165-L201","documentation":"JobEntryMailValidator.loadRep() throws this KettleException when reading the job entry's persisted attributes (smtpCheck, timeout, defaultSMTP, emailSender, emailAddress) from the Kettle repository fails with a KettleDatabaseException. The message key is concatenated with the job entry id to identify the failing record. It wraps the underlying database exception, so getCause() holds the real reason.","triggerScenarios":"Calling loadRep() on a job entry whose repository row is corrupted, whose attributes column contains values incompatible with the expected types, or when the underlying repository database connection fails mid-read.","commonSituations":"Repository database is down or network-partitioned; the kettle repository schema is from an older/newer version missing attribute columns; the job entry row was manually edited or corrupted; permission problems on the repository tables.","solutions":["Check the wrapped KettleDatabaseException (getCause()) for the real database error and fix connectivity/permissions to the repository database.","Verify the repository schema is up to date (run repository upgrade tools).","Re-save the job entry from Spoon so attributes are rewritten cleanly.","If the row is irrecoverably corrupt, delete and recreate the job entry in the repository."],"exampleFix":"// before\n} catch ( KettleDatabaseException dbe ) {\n  throw new KettleException( ... + id_jobentry, dbe );\n}\n// after\n} catch ( KettleDatabaseException dbe ) {\n  logError( BaseMessages.getString( PKG, \"JobEntryMailValidator.Meta.UnableToLoadFromRep\" ) + id_jobentry, dbe );\n  throw new KettleException( ... + id_jobentry + \" cause=\" + dbe.getMessage(), dbe );\n}","handlingStrategy":"try-catch","validationCode":"// Before loadRep: verify repository connectivity\nif ( repository == null || !repository.isConnected() ) {\n  throw new KettleException( \"Repository not connected; cannot load JobEntryMailValidator \" + id_jobentry );\n}","typeGuard":null,"tryCatchPattern":"try {\n  jobEntry.loadRep( rep, id_jobentry, databases, metaStore );\n} catch ( KettleException e ) {\n  // inspect e.getCause() (KettleDatabaseException) for the DB-level reason\n  logError( \"Failed to load mail validator job entry \" + id_jobentry, e );\n  throw e;\n}","preventionTips":["Keep the repository schema upgraded to match the Pentaho version.","Monitor repository database health before batch-loading jobs.","Avoid hand-editing repository tables.","Wrap loadRep in retry logic for transient connection failures."],"tags":["repository","database","job-entry","kettle"],"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"}