{"record":{"id":"359d689b54d34756","repo":"apache/hadoop","slug":"class-not-found","errorCode":null,"errorMessage":"Class {} not found","messagePattern":"Class (.+?) not found","errorType":"exception","errorClass":"ClassNotFoundException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java","lineNumber":2628,"sourceCode":"   */\n  public InetSocketAddress updateConnectAddr(String name,\n                                             InetSocketAddress addr) {\n    final InetSocketAddress connectAddr = NetUtils.getConnectAddress(addr);\n    setSocketAddr(name, connectAddr);\n    return connectAddr;\n  }\n  \n  /**\n   * Load a class by name.\n   * \n   * @param name the class name.\n   * @return the class object.\n   * @throws ClassNotFoundException if the class is not found.\n   */\n  public Class<?> getClassByName(String name) throws ClassNotFoundException {\n    Class<?> ret = getClassByNameOrNull(name);\n    if (ret == null) {\n      throw new ClassNotFoundException(\"Class \" + name + \" not found\");\n    }\n    return ret;\n  }\n  \n  /**\n   * Load a class by name, returning null rather than throwing an exception\n   * if it couldn't be loaded. This is to avoid the overhead of creating\n   * an exception.\n   * \n   * @param name the class name\n   * @return the class object, or null if it could not be found.\n   */\n  public Class<?> getClassByNameOrNull(String name) {\n    Map<String, WeakReference<Class<?>>> map;\n    \n    synchronized (CACHE_CLASSES) {\n      map = CACHE_CLASSES.get(classLoader);\n      if (map == null) {","sourceCodeStart":2610,"sourceCodeEnd":2646,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java#L2610-L2646","documentation":"Error \"Class {} not found\" thrown in apache/hadoop.","triggerScenarios":"Raised at runtime when the documented precondition or configuration requirement for this operation is violated.","commonSituations":"Misconfigured or missing property, invalid user input, or calling the API before its prerequisites are met.","solutions":["Add the missing class to the classpath or correct the class name in the configuration property."],"exampleFix":"Fix the property to the fully-qualified class name and ship the jar.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}