{"record":{"id":"bdcf364c7512f969","repo":"pentaho/pentaho-kettle","slug":"error-loading-job","errorCode":null,"errorMessage":"Error loading job","messagePattern":"Error loading job","errorType":"exception","errorClass":"InvocationTargetException","httpStatus":null,"severity":"error","filePath":"ui/src/main/java/org/pentaho/di/ui/job/dialog/JobLoadProgressDialog.java","lineNumber":104,"sourceCode":"            ( objectId == null ) ? jobname : objectId.toString() );\n\n          if ( objectId != null ) {\n            jobInfo = rep.loadJob( objectId, versionLabel );\n          } else {\n            jobInfo = rep.loadJob( jobname, repdir, new ProgressMonitorAdapter( monitor ), versionLabel );\n          }\n\n          // Call extension point(s) now that the file has been opened\n          ExtensionPointHandler.callExtensionPoint( spoon.getLog(), KettleExtensionPoint.JobAfterOpen.id, jobInfo );\n\n          if ( jobInfo.hasMissingPlugins() ) {\n            MissingEntryDialog missingDialog = new MissingEntryDialog( shell, jobInfo.getMissingEntries() );\n            if ( missingDialog.open() == null ) {\n              jobInfo = null;\n            }\n          }\n        } catch ( KettleException e ) {\n          throw new InvocationTargetException( e, \"Error loading job\" );\n        }\n      }\n    };\n\n    try {\n      ProgressMonitorDialog pmd = new ProgressMonitorDialog( shell );\n      pmd.run( true, false, op );\n    } catch ( InvocationTargetException e ) {\n      KettleRepositoryLostException krle = KettleRepositoryLostException.lookupStackStrace( e );\n      if ( krle != null ) {\n        throw krle;\n      }\n      new ErrorDialog( shell, \"Error loading job\", \"An error occured loading the job!\", e );\n      jobInfo = null;\n    } catch ( InterruptedException e ) {\n      new ErrorDialog( shell, \"Error loading job\", \"An error occured loading the job!\", e );\n      jobInfo = null;\n    }","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/ui/src/main/java/org/pentaho/di/ui/job/dialog/JobLoadProgressDialog.java#L86-L122","documentation":"JobLoadProgressDialog's monitor runnable loads a job (JobMeta) inside a ProgressMonitorDialog; any KettleException from the load is rethrown as an InvocationTargetException with message 'Error loading job' so the progress dialog machinery can surface it on the UI thread. It is a generic wrapper — the real reason is the chained KettleException cause.","triggerScenarios":"The runnable's load call (e.g. JobMeta construction / loadJob from repository or file) throws KettleException: corrupt or unreadable .kjb file, missing job entries/plugins, repository connection failure, or unsupported file version.","commonSituations":"Opening a job from a repository that is unreachable or whose credentials changed; a .kjb referencing plugins not installed in this PDI instance; files saved by a newer PDI version; XML corrupted by a bad merge/transfer.","solutions":["Inspect the InvocationTargetException's cause (KettleException) stack trace for the actual load error.","Verify the repository connection (credentials, URL) or the .kjb file path before opening.","Install the missing plugins/entries reported (see MissingEntryDialog for missing entries).","Open the .kjb in a text editor / newer-compatible PDI version to validate the XML."],"exampleFix":"// before\nnew JobLoadProgressDialog( shell, repository, filename, ... ).open(); // opaque 'Error loading job'\n\n// after\ntry {\n  new JobLoadProgressDialog( shell, repository, filename, ... ).open();\n} catch ( Exception e ) {\n  Throwable root = e;\n  while ( root.getCause() != null ) root = root.getCause();\n  log.logError( \"Job load failed: \" + root.getMessage(), root );\n}","handlingStrategy":"try-catch","validationCode":"if ( repository != null && !repository.isConnected() ) {\n  throw new IllegalStateException( \"Connect to the repository before loading the job\" );\n}\nif ( filename != null && !new File( filename ).exists() ) {\n  throw new IllegalStateException( \"Job file missing: \" + filename );\n}","typeGuard":null,"tryCatchPattern":"try {\n  new JobLoadProgressDialog( shell, repository, filename, ... ).open();\n} catch ( Exception e ) {\n  Throwable root = e;\n  while ( root.getCause() != null ) root = root.getCause();\n  showMessageBox( \"Error loading job\", root.getMessage() );\n}","preventionTips":["Unwrap InvocationTargetException/KettleException causes to see the real error","Ensure required plugins for all job entries are installed","Validate .kjb XML and PDI version compatibility before opening","Confirm repository connectivity before triggering the load dialog"],"tags":["job","loading","ui-dialog","kettle"],"backgroundTag":"file-read-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"}