{"record":{"id":"4b3a78df3fcfead1","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-job-entry-copy-from-repository-with-id","errorCode":null,"errorMessage":"Unable to load job entry copy from repository with id_jobentry_copy=jobEntryCopyId","messagePattern":"Unable to load job entry copy from 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":184,"sourceCode":"                + 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 {\n      JobEntryInterface entry = copy.getEntry();\n      /*\n       * --1-- Save the JobEntryCopy details... --2-- If we don't find a id_jobentry, save the jobentry (meaning: only\n       * once)","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryJobEntryDelegate.java#L166-L202","documentation":"While loading a job entry copy from the database repository, a KettleDatabaseException (SQL/JDBC-level failure) occurred. The id_jobentry_copy is wrapped into a KettleException with cause attached so the underlying database error is preserved.","triggerScenarios":"Any database failure during the SELECT of the R_JOBENTRY_COPY row: connection loss, locked tables, bad schema, missing table after failed repository install.","commonSituations":"Repository database down or network blip mid-load; schema mismatch after partial repository upgrade; DB connection pool exhausted; deadlock/timeout on the repository tables.","solutions":["Inspect the wrapped KettleDatabaseException cause for the real SQL error and fix the database issue (connectivity, locks, schema)","Verify the repository schema is installed/updated for this Pentaho version (run the repository SQL scripts or Repository Connect upgrade)","Test repository connectivity before bulk loads and retry transient failures","Check DB logs for deadlocks or lock waits on R_JOBENTRY_COPY"],"exampleFix":"// catch and surface the cause\ntry {\n  JobEntryCopy c = repository.jobEntryDelegate.loadJobEntryCopy(jobId, copyId, jobMeta);\n} catch (KettleException e) {\n  if (e.getCause() instanceof KettleDatabaseException) {\n    logError(\"Repository DB failure loading entry \" + copyId, e.getCause().getCause());\n  }\n}","handlingStrategy":"retry","validationCode":"null","typeGuard":"null","tryCatchPattern":"try { ... } catch (KettleException e) {\n  Throwable c = e.getCause();\n  if (c instanceof KettleDatabaseException) { /* retry with backoff or fail fast with DB diagnostics */ }\n}","preventionTips":["Use a connection pool with health checks on the repository DB","Handle transient SQL errors with bounded retries","Keep repository schema version aligned with PDI version"],"tags":["kettle","repository","database","sql"],"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"}