{"record":{"id":"984280a9aae6b1b0","repo":"apache/hadoop","slug":"classpathfile-not-found-on-classpath","errorCode":null,"errorMessage":"{classpathFile} not found on CLASSPATH","messagePattern":"(.+?) not found on CLASSPATH","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobClient.java","lineNumber":911,"sourceCode":"  ) throws IOException, InterruptedException {\n    return ((NetworkedJob)job).monitorAndPrintJob();\n  }\n\n  static String getTaskLogURL(TaskAttemptID taskId, String baseUrl) {\n    return (baseUrl + \"/tasklog?plaintext=true&attemptid=\" + taskId); \n  }\n  \n  static Configuration getConfiguration(String jobTrackerSpec)\n  {\n    Configuration conf = new Configuration();\n    if (jobTrackerSpec != null) {        \n      if (jobTrackerSpec.indexOf(\":\") >= 0) {\n        conf.set(\"mapred.job.tracker\", jobTrackerSpec);\n      } else {\n        String classpathFile = \"hadoop-\" + jobTrackerSpec + \".xml\";\n        URL validate = conf.getResource(classpathFile);\n        if (validate == null) {\n          throw new RuntimeException(classpathFile + \" not found on CLASSPATH\");\n        }\n        conf.addResource(classpathFile);\n      }\n    }\n    return conf;\n  }\n\n  /**\n   * Sets the output filter for tasks. only those tasks are printed whose\n   * output matches the filter. \n   * @param newValue task filter.\n   */\n  @Deprecated\n  public void setTaskOutputFilter(TaskStatusFilter newValue){\n    this.taskOutputFilter = newValue;\n  }\n    \n  /**","sourceCodeStart":893,"sourceCodeEnd":929,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobClient.java#L893-L929","documentation":"Fires in JobClient's command-line configuration handling: when the -jobtracker/-jt argument is given as a name without a host:port colon, JobClient treats it as a resource name and looks for hadoop-<name>.xml on the classpath. This error means that resource file could not be found, so the job tracker configuration could not be resolved. Generic guard on the resolved configuration file name derived from user input.","triggerScenarios":"Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobClient.java:911 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the reported jar/resource to the CLASSPATH used to launch the Hadoop command, or correct the classpath entry path."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}