{"record":{"id":"202aa6564ece190e","repo":"pentaho/pentaho-kettle","slug":"the-job-needs-a-name-to-uniquely-identify-it-by-on-the","errorCode":null,"errorMessage":"The job needs a name to uniquely identify it by on the remote server.","messagePattern":"The job needs a name to uniquely identify it by on the remote server\\.","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/Job.java","lineNumber":1724,"sourceCode":"   *          the execution configuration\n   * @param repository\n   *          the repository\n   * @param metaStore\n   *          the metaStore\n   * @return the string\n   * @throws KettleException\n   *           the kettle exception\n   */\n  public static String sendToSlaveServer( JobMeta jobMeta, JobExecutionConfiguration executionConfiguration,\n      Repository repository, IMetaStore metaStore ) throws KettleException {\n    String carteObjectId;\n    SlaveServer slaveServer = executionConfiguration.getRemoteServer();\n\n    if ( slaveServer == null ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"Job.Log.NoSlaveServerSpecified\" ) );\n    }\n    if ( Utils.isEmpty( jobMeta.getName() ) ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"Job.Log.UniqueJobName\" ) );\n    }\n\n    // Align logging levels between execution configuration and remote server\n    slaveServer.getLogChannel().setLogLevel( executionConfiguration.getLogLevel() );\n\n    try {\n      // Inject certain internal variables to make it more intuitive.\n      //\n      for ( String var : Const.INTERNAL_TRANS_VARIABLES ) {\n        executionConfiguration.getVariables().put( var, jobMeta.getVariable( var ) );\n      }\n      for ( String var : Const.INTERNAL_JOB_VARIABLES ) {\n        executionConfiguration.getVariables().put( var, jobMeta.getVariable( var ) );\n      }\n\n      if ( executionConfiguration.isPassingExport() ) {\n        // First export the job... slaveServer.getVariable(\"MASTER_HOST\")\n        //","sourceCodeStart":1706,"sourceCodeEnd":1742,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/Job.java#L1706-L1742","documentation":"sendToSlaveServer() throws this KettleException when jobMeta.getName() is empty. The job name is the unique identifier used to register and address the job on the remote Carte server, so an unnamed job cannot be posted remotely.","triggerScenarios":"Calling Job.sendToSlaveServer() with a JobMeta whose name was never set (e.g. a job built in code via new JobMeta() without setName(), or an unnamed in-memory transformation/job submitted remotely).","commonSituations":"Programmatically generated jobs never named before remote submission; jobs loaded from sources that don't set a name; duplicates allowed locally but the remote servlet requires a unique name.","solutions":["Call jobMeta.setName(\"unique-job-name\") before remote execution.","Load the job from a repository or file so its name is populated rather than building JobMeta in memory.","Ensure the name is unique on the target Carte server to avoid conflicts with prior registrations.","Add a pre-flight check: if Utils.isEmpty(jobMeta.getName()) reject before calling sendToSlaveServer."],"exampleFix":"// before\nJobMeta jobMeta = new JobMeta();\nJob.sendToSlaveServer(jobMeta, execCfg, repo, metaStore); // throws\n// after\nJobMeta jobMeta = new JobMeta();\njobMeta.setName(\"nightly-etl-\" + System.currentTimeMillis());\nJob.sendToSlaveServer(jobMeta, execCfg, repo, metaStore);","handlingStrategy":"validation","validationCode":"if (Utils.isEmpty(jobMeta.getName())) {\n  jobMeta.setName(\"job-\" + UUID.randomUUID());\n}","typeGuard":null,"tryCatchPattern":"try {\n  Job.sendToSlaveServer(jobMeta, execCfg, repo, metaStore);\n} catch (KettleException e) {\n  if (Utils.isEmpty(jobMeta.getName())) {\n    jobMeta.setName(\"default-job\");\n    return Job.sendToSlaveServer(jobMeta, execCfg, repo, metaStore);\n  }\n  throw e;\n}","preventionTips":["Enforce setName() immediately after constructing JobMeta in code.","Add a preflight assert on jobMeta.getName() before any remote call.","Prefer loading jobs from repository/file so names are always populated.","Make names unique per Carte server to avoid registration clashes."],"tags":["remote-execution","naming","validation"],"backgroundTag":"empty-required-field","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"}