{"record":{"id":"18fcc5279fc87775","repo":"pentaho/pentaho-kettle","slug":"jobcopyfiles-error-exception-unableloadrep","errorCode":null,"errorMessage":"JobCopyFiles.Error.Exception.UnableLoadRep","messagePattern":"JobCopyFiles\\.Error\\.Exception\\.UnableLoadRep","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/copyfiles/JobEntryCopyFiles.java","lineNumber":294,"sourceCode":"      include_subfolders = rep.getJobEntryAttributeBoolean( id_jobentry, \"include_subfolders\" );\n      remove_source_files = rep.getJobEntryAttributeBoolean( id_jobentry, \"remove_source_files\" );\n\n      add_result_filesname = rep.getJobEntryAttributeBoolean( id_jobentry, \"add_result_filesname\" );\n      destination_is_a_file = rep.getJobEntryAttributeBoolean( id_jobentry, \"destination_is_a_file\" );\n      create_destination_folder = rep.getJobEntryAttributeBoolean( id_jobentry, \"create_destination_folder\" );\n\n      // How many arguments?\n      int argnr = rep.countNrJobEntryAttributes( id_jobentry, \"source_filefolder\" );\n      allocate( argnr );\n\n      // Read them all...\n      for ( int a = 0; a < argnr; a++ ) {\n        source_filefolder[a] = loadSourceRep( rep, id_jobentry, a );\n        destination_filefolder[a] = loadDestinationRep( rep, id_jobentry, a );\n        wildcard[a] = rep.getJobEntryAttributeString( id_jobentry, a, \"wildcard\" );\n      }\n    } catch ( KettleException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobCopyFiles.Error.Exception.UnableLoadRep\" )\n        + id_jobentry, dbe );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {\n    try {\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"copy_empty_folders\", copy_empty_folders );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"arg_from_previous\", arg_from_previous );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"overwrite_files\", overwrite_files );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"include_subfolders\", include_subfolders );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"remove_source_files\", remove_source_files );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"add_result_filesname\", add_result_filesname );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"destination_is_a_file\", destination_is_a_file );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"create_destination_folder\", create_destination_folder );\n\n      // save the arguments...\n      if ( source_filefolder != null ) {\n        for ( int i = 0; i < source_filefolder.length; i++ ) {","sourceCodeStart":276,"sourceCodeEnd":312,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/copyfiles/JobEntryCopyFiles.java#L276-L312","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// before loading from repository\nif (id_jobentry == null || id_jobentry.getId() < 0) {\n  throw new IllegalArgumentException(\"Invalid id_jobentry\");\n}\nif (!rep.isConnected() && !rep.connect()) {\n  throw new IllegalStateException(\"Repository not reachable\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  jobEntry.loadRep(rep, metaStore, id_jobentry, databases, slaveServers);\n} catch (KettleException e) {\n  logError(\"Repository load failed for id_jobentry=\" + id_jobentry + \": \" + e.getCause(), e);\n  // retry once after reconnecting, or fall back to default entry settings\n}","preventionTips":["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"],"tags":["pdi","kettle","repository","database"],"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"}