{"record":{"id":"c0c43234b40daf95","repo":"apache/hadoop","slug":"no-class-configured-for","errorCode":null,"errorMessage":"No class configured for {}","messagePattern":"No class configured for (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java","lineNumber":1864,"sourceCode":"   * @return the class of the journal implementation\n   * @throws IllegalArgumentException if no class is configured for uri\n   */\n  static Class<? extends JournalManager> getJournalClass(Configuration conf,\n                               String uriScheme) {\n    String key\n      = DFSConfigKeys.DFS_NAMENODE_EDITS_PLUGIN_PREFIX + \".\" + uriScheme;\n    Class <? extends JournalManager> clazz = null;\n    try {\n      clazz = conf.getClass(key, null, JournalManager.class);\n    } catch (RuntimeException re) {\n      throw new IllegalArgumentException(\n          \"Invalid class specified for \" + uriScheme, re);\n    }\n      \n    if (clazz == null) {\n      LOG.warn(\"No class configured for \" +uriScheme\n               + \", \" + key + \" is empty\");\n      throw new IllegalArgumentException(\n          \"No class configured for \" + uriScheme);\n    }\n    return clazz;\n  }\n\n  /**\n   * Construct a custom journal manager.\n   * The class to construct is taken from the configuration.\n   * @param uri Uri to construct\n   * @return The constructed journal manager\n   * @throws IllegalArgumentException if no class is configured for uri\n   */\n  @VisibleForTesting\n  JournalManager createJournal(URI uri) {\n    Class<? extends JournalManager> clazz\n      = getJournalClass(conf, uri.getScheme());\n\n    try {","sourceCodeStart":1846,"sourceCodeEnd":1882,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java#L1846-L1882","documentation":"Same lookup in FSEditLog.getJournalClass, but conf.getClass returned null: the key dfs.namenode.edits.journal-plugin.<scheme> is absent. An edits URI uses a scheme for which no JournalManager implementation is registered, so getJournalClass throws IllegalArgumentException('No class configured for <scheme>') after logging a warning that names the missing key.","triggerScenarios":"dfs.namenode.edits.dir or dfs.namenode.shared.edits.dir contains a URI whose scheme has no built-in handler (not file or qjm) and no dfs.namenode.edits.journal-plugin.<scheme> property exists. Also hit when a scheme is misspelled, so it resolves to no plugin at all.","commonSituations":"Typo in the edits URI scheme (for example 'qjm3:' instead of 'qjm:'); plugin property deleted during config cleanup while the URI stayed; property placed in a config file the failing host does not load; config migration dropping custom journal entries.","solutions":["Add dfs.namenode.edits.journal-plugin.<scheme>=<fully-qualified JournalManager class> to hdfs-site.xml","Fix the scheme in dfs.namenode.edits.dir / dfs.namenode.shared.edits.dir: file:// for local edits, qjm://HOST:PORT;HOST:PORT;HOST:PORT/JOURNALNAME for QuorumJournalManager","Verify the effective value on the failing host with 'hdfs getconf -confKey dfs.namenode.edits.dir' to confirm the property is loaded"],"exampleFix":"<!-- before: myj:// URI present, no plugin registered -->\n<property><name>dfs.namenode.edits.dir</name><value>myj://journalhost:8220/nn</value></property>\n\n<!-- after: register the scheme handler -->\n<property><name>dfs.namenode.edits.journal-plugin.myj</name><value>com.example.storage.MyJournalManager</value></property>","handlingStrategy":"validation","validationCode":"// every scheme used in edits dirs must be built-in or have a plugin entry\nSet<String> builtin = new HashSet<>(Arrays.asList(\"file\", \"qjm\", \"hftp\", \"https\"));\nfor (URI u : FSNamesystem.getNamespaceEditsDirs(conf)) {\n  String scheme = u.getScheme();\n  boolean known = scheme == null || builtin.contains(scheme)\n      || conf.get(\"dfs.namenode.edits.journal-plugin.\" + scheme) != null;\n  if (!known) {\n    throw new IllegalStateException(\n        \"No dfs.namenode.edits.journal-plugin.\" + scheme + \" configured for \" + u);\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  // NameNode / FSEditLog construction\n} catch (IllegalArgumentException e) {\n  if (e.getMessage() != null && e.getMessage().startsWith(\"No class configured for\")) {\n    // e.getMessage() names the scheme: add dfs.namenode.edits.journal-plugin.<scheme>\n  }\n  throw e;\n}","preventionTips":["Lint edits-dir schemes against the journal-plugin keys in config review","Confirm effective config on the failing host with 'hdfs getconf -confKey dfs.namenode.edits.dir'","Keep custom scheme names short and stable to avoid typos"],"tags":["hdfs","namenode","edit-log","journal-manager","configuration","missing-config"],"backgroundTag":"missing-configuration-key","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}