{"record":{"id":"d8c860c27af0cab4","repo":"apache/hadoop","slug":"not","errorCode":null,"errorMessage":"{} not {}","messagePattern":"\\{\\} not \\{\\}","errorType":"validation","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java","lineNumber":2751,"sourceCode":"   * returned.\n   * \n   * An exception is thrown if the returned class does not implement the named\n   * interface. \n   * \n   * @param name the conf key name.\n   * @param defaultValue default value.\n   * @param xface the interface implemented by the named class.\n   * @param <U> Interface class type.\n   * @return property value as a <code>Class</code>, \n   *         or <code>defaultValue</code>.\n   */\n  public <U> Class<? extends U> getClass(String name, \n                                         Class<? extends U> defaultValue, \n                                         Class<U> xface) {\n    try {\n      Class<?> theClass = getClass(name, defaultValue);\n      if (theClass != null && !xface.isAssignableFrom(theClass))\n        throw new RuntimeException(theClass+\" not \"+xface.getName());\n      else if (theClass != null)\n        return theClass.asSubclass(xface);\n      else\n        return null;\n    } catch (Exception e) {\n      throw new RuntimeException(e);\n    }\n  }\n\n  /**\n   * Get the value of the <code>name</code> property as a <code>List</code>\n   * of objects implementing the interface specified by <code>xface</code>.\n   * \n   * An exception is thrown if any of the classes does not exist, or if it does\n   * not implement the named interface.\n   * \n   * @param name the property name.\n   * @param xface the interface implemented by the classes named by","sourceCodeStart":2733,"sourceCodeEnd":2769,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java#L2733-L2769","documentation":"Thrown in Configuration.getClass when the configured class name is null or unresolvable, so no class can be returned for the property. The message interpolates the class name and what it failed to be (e.g. not found).","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":["The configured class is not of the expected type; configure a class of the required interface."],"exampleFix":"Use a class implementing the expected interface.","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"}