{"record":{"id":"d14558e5b58b6434","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-job-with-id-idjob","errorCode":null,"errorMessage":"Unable to load job with id [\" + idJob + \"]","messagePattern":"Unable to load job with id \\[\" \\+ idJob \\+ \"\\]","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java","lineNumber":3244,"sourceCode":"        jobMeta.setMetaStore( MetaStoreConst.getDefaultMetastore() ); // inject metastore\n\n        // Additional obfuscation through obscurity\n        jobMeta.setRepositoryLock( unifiedRepositoryLockService.getLock( file ) );\n\n        ExtensionPointHandler.callExtensionPoint( log, KettleExtensionPoint.JobSharedObjectsLoaded.id, jobMeta );\n        jobDelegate.dataNodeToElement( pur.getDataAtVersionForRead( idJob.getId(), versionLabel,\n          NodeRepositoryFileData.class ).getNode(), jobMeta );\n\n      } finally {\n        readWriteLock.readLock().unlock();\n      }\n\n      ExtensionPointHandler.callExtensionPoint( log, KettleExtensionPoint.JobMetaLoaded.id, jobMeta );\n\n      jobMeta.clearChanged();\n      return jobMeta;\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to load job with id [\" + idJob + \"]\", e );\n    }\n  }\n\n  @Override\n  public TransMeta loadTransformation( ObjectId idTransformation, String versionLabel ) throws KettleException {\n    return loadTransformation( idTransformation, versionLabel, null );\n  }\n\n  @Override\n  public TransMeta loadTransformation( ObjectId idTransformation, String versionLabel, VariableSpace parent )\n      throws KettleException {\n    try {\n      RepositoryFile file = null;\n      EETransMeta transMeta = null;\n\n      readWriteLock.readLock().lock();\n      try {\n        if ( versionLabel != null ) {","sourceCodeStart":3226,"sourceCodeEnd":3262,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java#L3226-L3262","documentation":"Catch-all wrapper in PurRepository.loadJob(ObjectId idJob, String versionLabel): any non-KettleException while loading a job by id (file fetch at version, revision lookup, JobMeta build, JobMetaLoaded extension point) is re-thrown as a KettleException with the job id in the message.","triggerScenarios":"Calling loadJob(ObjectId, String versionLabel) with an invalid/deleted id, an unsupported versionLabel, corrupt stored content, or a repository connection failure.","commonSituations":"Caching an ObjectId that was later deleted; referencing an id from another repository; requesting a version label that no longer exists; server connection dropped mid-load.","solutions":["Check e.getCause() for the real failure (not-found vs IO vs parse)","Validate the id still exists via repository.exists(ObjectId) before loading","Re-connect to the repository and retry after a connectivity failure","Verify the versionLabel is valid by listing object revisions first"],"exampleFix":"// before\nJobMeta jm = repo.loadJob(staleId, null);\n// after\nif (repo.exists(staleId)) {\n  JobMeta jm = repo.loadJob(staleId, null);\n} else {\n  // re-resolve id from path\n  JobMeta jm = repo.loadJob(path, dir, null, null);\n}","handlingStrategy":"try-catch","validationCode":"if (!repo.exists(idJob)) {\n  throw new KettleException(\"Job id no longer exists: \" + idJob);\n}","typeGuard":null,"tryCatchPattern":"try {\n  JobMeta jm = repo.loadJob(idJob, versionLabel);\n} catch (KettleException e) {\n  log.error(\"Job load failed for id \" + idJob + \", cause=\" + e.getCause(), e);\n  // fallback: reload by path to obtain a fresh id\n  JobMeta jm2 = repo.loadJob(path, dir, null, null);\n}","preventionTips":["Do not cache ObjectIds across repository sessions","Validate version labels via getObjectRevision before loading","Re-resolve ids from paths when loads fail","Check connectivity before load operations"],"tags":["pentaho-kettle","repository","job","wrapped-exception"],"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"}