{"record":{"id":"3281291ce03f7c90","repo":"pentaho/pentaho-kettle","slug":"unable-to-find-job-entry-copy-in-repository-with-id-jobentry","errorCode":null,"errorMessage":"Unable to find job entry copy in repository with id_jobentry_copy=jobEntryCopyId","messagePattern":"Unable to find job entry copy in repository with id_jobentry_copy=jobEntryCopyId","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryJobEntryDelegate.java","lineNumber":180,"sourceCode":"\n              jobentries.add( jobEntryCopy.getEntry() );\n            } else {\n              throw new KettleException( \"JobEntryLoader was unable to find Job Entry Plugin with description [\"\n                + jet_code + \"].\" );\n            }\n          } else {\n            throw new KettleException( \"Unable to find Job Entry Type with id=\"\n              + jobEntryTypeId + \" in the repository\" );\n          }\n        }\n\n        jobEntryCopy.setLocation( locx, locy );\n        jobEntryCopy.setDrawn( isdrawn );\n        jobEntryCopy.setLaunchingInParallel( isparallel );\n\n        return jobEntryCopy;\n      } else {\n        throw new KettleException( \"Unable to find job entry copy in repository with id_jobentry_copy=\"\n          + jobEntryCopyId );\n      }\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( \"Unable to load job entry copy from repository with id_jobentry_copy=\"\n        + jobEntryCopyId, dbe );\n    }\n  }\n\n  @SuppressWarnings( \"deprecation\" )\n  private void compatibleJobEntryLoadRep( JobEntryInterface jobEntry, KettleDatabaseRepository repository,\n    ObjectId id_jobentry_type, List<DatabaseMeta> databases, List<SlaveServer> slaveServers ) throws KettleException {\n\n    jobEntry.loadRep( repository, id_jobentry_type, databases, slaveServers );\n\n  }\n\n  public void saveJobEntryCopy( JobEntryCopy copy, ObjectId id_job, KettleDatabaseRepositoryMetaStore metaStore ) throws KettleException {\n    try {","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryJobEntryDelegate.java#L162-L198","documentation":"No row was found in R_JOBENTRY_COPY for the requested id_jobentry_copy, so loadJobEntryCopy cannot return a JobEntryCopy and throws a KettleException. This is a plain record-not-found condition in the database repository.","triggerScenarios":"Calling loadJobEntryCopy(jobId, jobEntryCopyId, ...) with a jobEntryCopyId whose row was deleted from R_JOBENTRY_COPY, or an id from a different/cleared repository.","commonSituations":"Caching ObjectIds across repository refreshes; copying jobs between repositories by id; rows removed by repository cleanup scripts; pointing the client at a different database than where the job was saved.","solutions":["Verify the row exists: SELECT * FROM R_JOBENTRY_COPY WHERE ID_JOBENTRY_COPY = <id>","Reload the JobMeta from the repository so job entry copies are looked up with fresh, valid ids instead of stale cached ones","Re-save the job to the repository to recreate missing copy rows","Confirm you are connected to the same repository database the ids came from"],"exampleFix":"// before\nJobEntryCopy c = repository.jobEntryDelegate.loadJobEntryCopy(jobId, staleCopyId, jobMeta);\n// after: re-resolve the id from a freshly loaded job\nJobMeta jobMeta = repository.loadJob(jobName, null);\nJobEntryCopy c = jobMeta.findJobEntry(entryName, 0, false);","handlingStrategy":"validation","validationCode":"Long copyId = ((LongObjectId) jobEntryCopyId).longValue();\n// run: SELECT COUNT(*) FROM R_JOBENTRY_COPY WHERE ID_JOBENTRY_COPY = ?\nif (count == 0) throw new IllegalStateException(\"id_jobentry_copy not in repository\");","typeGuard":"boolean copyExists(ObjectId copyId) { return repository.connectionDelegate.getDatabase().countRecords(repository.databaseMeta.getSchemaAndTable(\"R_JOBENTRY_COPY\"), \"ID_JOBENTRY_COPY\", copyId) > 0; }","tryCatchPattern":"try { ... } catch (KettleException e) { if (e.getMessage().contains(\"Unable to find job entry copy\")) reloadJobMetaFromRepository(); }","preventionTips":["Do not cache ObjectIds across repository reconnects","Re-load JobMeta from the repository instead of reusing stale ids","Verify you are connected to the intended repository database"],"tags":["kettle","repository","database","record-not-found"],"backgroundTag":"record-not-found","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"}