pentaho/pentaho-kettle · error · KettleException
Unable to load job entry of type 'mail' from the repository…
Error message
Unable to load job entry of type 'mail' from the repository with idJobEntry=
What it means
JobEntryMail's repository load catches KettleDatabaseException while reading job entry attributes and rethrows as KettleException. The mail job entry metadata could not be loaded from the repository for the given idJobEntry.
Solutions
- Check the chained KettleDatabaseException cause for the root SQL error.
- Verify repository database connectivity and retry loading the job.
- Re-save/re-import the job from a .kjb file copy if repository rows are inconsistent.
- Clean up orphaned r_jobentry_attribute rows for the reported idJobEntry if needed.
Defensive patterns
Strategy: try-catch
Validate before calling
if (rep == null || !rep.isConnected()) {
throw new KettleException("Repository not connected; cannot load mail job entry.");
} Try / catch
try { loadJobEntryFromRepo(idJobEntry); } catch (KettleException e) {
logError("Repository load of mail job entry failed: " + e.getMessage(), e);
} Prevention
- Verify repository connectivity before batch job loads.
- Avoid deleting job rows directly in the DB; use Spoon to delete so attributes are cleaned too.
- Re-export jobs to files periodically as recovery copies.
When it happens
Trigger: loadRep reads embedded-image attributes from the repository and the DB read fails: connection dropped, missing r_jobentry_attribute rows, corrupted records.
Common situations: Repository DB connectivity issues; partially deleted job leaving orphaned/missing attributes; cross-repository id mismatch after export/import.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- JobEntryAbort.UnableToLoadFromRepo.Label
- JobEntryAbort.UnableToSaveToRepo.Label
- JobEntryAddResultFilenames.UnableToLoadFromRepo
- JobEntryConnectedToRepository.Meta.UnableToLoadFromRep
- JobEntryConnectedToRepository.Meta.UnableToSaveToRep
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/8670eee54866cb4c.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/mail-job/impl/src/main/java/org/pentaho/di/job/entries/mail/JobEntryMail.java:488
String typeCode = rep.getJobEntryAttributeString( idJobEntry, i, "file_type" );
fileType[i] = ResultFile.getType( typeCode );
}
zipFiles = rep.getJobEntryAttributeBoolean( idJobEntry, TAG_ZIP_FILES );
zipFilename = rep.getJobEntryAttributeString( idJobEntry, TAG_ZIP_NAME );
replyToAddresses = rep.getJobEntryAttributeString( idJobEntry, TAG_REPLY_TO_ADDRESSES );
// How many arguments?
int imagesNr = rep.countNrJobEntryAttributes( idJobEntry, TAG_EMBEDDED_IMAGE );
allocateImages( imagesNr );
// Read them all...
for ( int a = 0; a < imagesNr; a++ ) {
embeddedimages[a] = rep.getJobEntryAttributeString( idJobEntry, a, TAG_EMBEDDED_IMAGE );
contentids[a] = rep.getJobEntryAttributeString( idJobEntry, a, "contentid" );
}
} catch ( KettleDatabaseException dbe ) {
throw new KettleException( "Unable to load job entry of type 'mail' from the repository with idJobEntry="
+ idJobEntry, dbe );
}
}
@Override
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {
try {
rep.saveJobEntryAttribute( id_job, getObjectId(), TAG_SERVER, server );
rep.saveJobEntryAttribute( id_job, getObjectId(), TAG_PORT, port );
rep.saveJobEntryAttribute( id_job, getObjectId(), TAG_DESTINATION, destination );
rep.saveJobEntryAttribute( id_job, getObjectId(), TAG_DESTINATION_CC, destinationCc );
rep.saveJobEntryAttribute( id_job, getObjectId(), TAG_DESTINATION_BCC, destinationBCc );
rep.saveJobEntryAttribute( id_job, getObjectId(), TAG_REPLYTO, replyAddress );
rep.saveJobEntryAttribute( id_job, getObjectId(), TAG_REPLYTONAME, replyName );
rep.saveJobEntryAttribute( id_job, getObjectId(), TAG_SUBJECT, subject );
rep.saveJobEntryAttribute( id_job, getObjectId(), TAG_INCLUDE_DATE, includeDate );
rep.saveJobEntryAttribute( id_job, getObjectId(), TAG_CONTACT_PERSON, contactPerson );
rep.saveJobEntryAttribute( id_job, getObjectId(), TAG_CONTACT_PHONE, contactPhone );View on GitHub (pinned to f3058517a1)