{"record":{"id":"0f5a2da0f6c1f0bf","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-the-job-please-specify-the-name-and","errorCode":null,"errorMessage":"Unable to load the job: please specify the name and repository directory OR a filename","messagePattern":"Unable to load the job: please specify the name and repository directory OR a filename","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/job/JobEntryJob.java","lineNumber":696,"sourceCode":"          if ( log.isDetailed() ) {\n            logDetailed( \"Loading job from XML file : [\" + environmentSubstitute( filename ) + \"]\" );\n          }\n          break;\n        case REPOSITORY_BY_REFERENCE:\n          if ( log.isDetailed() ) {\n            logDetailed( \"Loading job from repository by reference : [\" + jobObjectId + \"]\" );\n          }\n          break;\n        default:\n          break;\n      }\n\n      JobMeta jobMeta = getJobMeta( rep, this );\n\n      // Verify that we loaded something, complain if we did not...\n      //\n      if ( jobMeta == null ) {\n        throw new KettleException(\n          \"Unable to load the job: please specify the name and repository directory OR a filename\" );\n      }\n\n      verifyRecursiveExecution( parentJob, jobMeta );\n\n      int iteration = 0;\n      String[] args1 = arguments;\n      // no arguments? Check the parent jobs arguments\n      if ( args1 == null || args1.length == 0 ) {\n        args1 = parentJob.getArguments();\n      }\n\n      copyVariablesFrom( parentJob );\n      setParentVariableSpace( parentJob );\n\n      //\n      // For the moment only do variable translation at the start of a job, not\n      // for every input row (if that would be switched on)","sourceCodeStart":678,"sourceCodeEnd":714,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/job/JobEntryJob.java#L678-L714","documentation":"In JobEntryJob.execute(), after getJobMeta(rep, this) attempts to load the referenced sub-job, a null result means the entry was configured with no usable source: neither a repository name+directory, nor a repository reference, nor a filename resolved. The entry throws this KettleException because there is nothing to run.","triggerScenarios":"Executing the 'Job' job entry when specificationMethod is REPOSITORY_BY_NAME but jobname/directory variables substitute to empty, or FILENAME but the environmentSubstitute'd filename is empty/null, or REPOSITORY_BY_REFERENCE with an invalid jobObjectId — getJobMeta() returns null and execute() throws.","commonSituations":"Job entry copied to another environment where variables like ${Internal.Job.Filename.Directory} don't resolve; jobname field left blank; repository connection null at runtime so repository-based load silently returns null.","solutions":["Open the Job entry dialog and set either a valid repository job name + directory or a filename","Verify the variables used in the jobname/filename fields resolve at runtime (log environmentSubstitute values)","Ensure the repository connection (rep) is available when the entry is configured as repository-based","If using by-reference, confirm jobObjectId points to an existing repository job"],"exampleFix":"// before: relying on a variable that may not resolve\n//   Job name: ${SUB_JOB_NAME}\n// after: guarantee a default so the name always resolves\n//   Job name: ${SUB_JOB_NAME:-monthly_load}  (set variable before the job runs)\nsetVariable(\"SUB_JOB_NAME\", Const.NVL(getVariable(\"SUB_JOB_NAME\", \"monthly_load\"), \"monthly_load\"));","handlingStrategy":"validation","validationCode":"JobEntryJob je = (JobEntryJob) jobMeta.findJobEntry(name);\nboolean ok = (je.getJobObjectId() != null)\n  || (je.getSpecificationMethod() == ObjectLocationSpecificationMethod.REPOSITORY_BY_NAME\n      && !Utils.isEmpty(je.getName()) && !Utils.isEmpty(je.getDirectory()))\n  || (je.getSpecificationMethod() == ObjectLocationSpecificationMethod.FILENAME\n      && !Utils.isEmpty(environmentSubstitute(je.getFilename())));\nif (!ok) throw new IllegalArgumentException(\"Job entry needs a repository name+directory or a filename\");","typeGuard":null,"tryCatchPattern":"try {\n  result = jobEntry.execute(parentResult, nr);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"please specify the name and repository directory OR a filename\")) {\n    // stop the job: configuration is incomplete, retrying will not help\n  }\n  throw e;\n}","preventionTips":["Always set either filename or repository job name+directory in the Job entry dialog","Avoid variables in jobname/filename unless they are guaranteed defined at runtime","After copying jobs across environments, re-verify each Job entry's target","Use REPOSITORY_BY_REFERENCE only when the referenced object is known to exist"],"tags":["pdi","kettle","configuration","job-entry"],"backgroundTag":"missing-required-argument","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"}