pentaho/pentaho-kettle · error · KettleException
JobCopyFiles.Error.Exception.UnableLoadRep
Error message
JobCopyFiles.Error.Exception.UnableLoadRep
What it means
JobEntryCopyFiles.loadRep throws this KettleException when loading the job entry's settings from the Pentaho repository database fails. It wraps the KettleException (typically KettleDatabaseException) and appends the id_jobentry, indicating the 'copy files' entry attributes (source/destination folders, wildcards) could not be read from repository tables.
Solutions
- Verify the repository database is reachable and the R_* tables exist and are at the correct schema version (run repository upgrade/repair).
- Re-save the job entry in Spoon to repopulate missing attribute rows.
- Check the chained exception (getCause()) for the underlying SQL error.
- Restore the job from repository history/backup if rows were deleted.
Defensive patterns
Strategy: try-catch
Validate before calling
// before loading from repository
if (id_jobentry == null || id_jobentry.getId() < 0) {
throw new IllegalArgumentException("Invalid id_jobentry");
}
if (!rep.isConnected() && !rep.connect()) {
throw new IllegalStateException("Repository not reachable");
} Try / catch
try {
jobEntry.loadRep(rep, metaStore, id_jobentry, databases, slaveServers);
} catch (KettleException e) {
logError("Repository load failed for id_jobentry=" + id_jobentry + ": " + e.getCause(), e);
// retry once after reconnecting, or fall back to default entry settings
} Prevention
- Keep the repository DB connection healthy (pools, timeouts)
- Run repository upgrade/repair after Pentaho version changes
- Back up R_JOBENTRY_ATTRIBUTE data before manual DB edits
- Re-save jobs in Spoon after restoring repository backups
When it happens
Trigger: Calling loadRep on a job entry whose id_jobentry rows are missing from the repository attribute tables, the repository connection is down, or a DB error (deadlock, dropped table R_JOBENTRY_ATTRIBUTE) occurs while reading attributes.
Common situations: Repository schema out of sync after Pentaho upgrade; database connection dropped mid-load; entry rows deleted manually from R_JOBENTRY_ATTRIBUTE; wrong repository credentials/tenant.
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
- GetSequenceMeta.Exception.UnableToReadStepInfo
- GetSequenceMeta.Exception.UnableToSaveStepInfo
- JobEntryCopyMoveResultFilenames.CanNotLoadFromRep
- JobMoveFiles.Error.Exception.UnableLoadRep
- Unable to load job entry of type 'create file' from the…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/18fcc5279fc87775.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/job/entries/copyfiles/JobEntryCopyFiles.java:294
include_subfolders = rep.getJobEntryAttributeBoolean( id_jobentry, "include_subfolders" );
remove_source_files = rep.getJobEntryAttributeBoolean( id_jobentry, "remove_source_files" );
add_result_filesname = rep.getJobEntryAttributeBoolean( id_jobentry, "add_result_filesname" );
destination_is_a_file = rep.getJobEntryAttributeBoolean( id_jobentry, "destination_is_a_file" );
create_destination_folder = rep.getJobEntryAttributeBoolean( id_jobentry, "create_destination_folder" );
// How many arguments?
int argnr = rep.countNrJobEntryAttributes( id_jobentry, "source_filefolder" );
allocate( argnr );
// Read them all...
for ( int a = 0; a < argnr; a++ ) {
source_filefolder[a] = loadSourceRep( rep, id_jobentry, a );
destination_filefolder[a] = loadDestinationRep( rep, id_jobentry, a );
wildcard[a] = rep.getJobEntryAttributeString( id_jobentry, a, "wildcard" );
}
} catch ( KettleException dbe ) {
throw new KettleException( BaseMessages.getString( PKG, "JobCopyFiles.Error.Exception.UnableLoadRep" )
+ id_jobentry, dbe );
}
}
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {
try {
rep.saveJobEntryAttribute( id_job, getObjectId(), "copy_empty_folders", copy_empty_folders );
rep.saveJobEntryAttribute( id_job, getObjectId(), "arg_from_previous", arg_from_previous );
rep.saveJobEntryAttribute( id_job, getObjectId(), "overwrite_files", overwrite_files );
rep.saveJobEntryAttribute( id_job, getObjectId(), "include_subfolders", include_subfolders );
rep.saveJobEntryAttribute( id_job, getObjectId(), "remove_source_files", remove_source_files );
rep.saveJobEntryAttribute( id_job, getObjectId(), "add_result_filesname", add_result_filesname );
rep.saveJobEntryAttribute( id_job, getObjectId(), "destination_is_a_file", destination_is_a_file );
rep.saveJobEntryAttribute( id_job, getObjectId(), "create_destination_folder", create_destination_folder );
// save the arguments...
if ( source_filefolder != null ) {
for ( int i = 0; i < source_filefolder.length; i++ ) {View on GitHub (pinned to f3058517a1)