{"record":{"id":"5370097c30e21eac","repo":"apache/seatunnel","slug":"load-hive-base-hadoop-config-failed","errorCode":"LOAD_HIVE_BASE_HADOOP_CONFIG_FAILED","errorMessage":"Failed to load hadoop configuration, please check it","messagePattern":"Failed to load hadoop configuration, please check it","errorType":"error_code","errorClass":"HiveConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/storage/AbstractStorage.java","lineNumber":109,"sourceCode":"            String hdfsSitePath = readonlyConfig.get(HiveBaseOptions.HDFS_SITE_PATH);\n            if (StringUtils.isNotBlank(hdfsSitePath)) {\n                configuration.addResource(new File(hdfsSitePath).toURI().toURL());\n            }\n\n            if (StringUtils.isNotBlank(hiveSitePath)) {\n                configuration.addResource(new File(hiveSitePath).toURI().toURL());\n            }\n            // Try to load from hadoopConf\n            Optional<Map<String, String>> hadoopConf =\n                    readonlyConfig.getOptional(HiveBaseOptions.HADOOP_CONF);\n            if (hadoopConf.isPresent()) {\n                hadoopConf.get().forEach((k, v) -> configuration.set(k, v));\n            }\n            return configuration;\n        } catch (Exception e) {\n            String errorMsg = String.format(\"Failed to load hadoop configuration, please check it\");\n            log.error(errorMsg + \":\" + ExceptionUtils.getMessage(e));\n            throw new HiveConnectorException(\n                    HiveConnectorErrorCode.LOAD_HIVE_BASE_HADOOP_CONFIG_FAILED, e);\n        }\n    }\n}\n","sourceCodeStart":91,"sourceCodeEnd":114,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/storage/AbstractStorage.java#L91-L114","documentation":"loadHiveBaseHadoopConfig builds a Hadoop Configuration from hadoop_conf_path XML files and/or the hadoop_conf option. Any exception while locating or parsing these resources (missing files, unreadable paths, malformed XML, invalid classpath resource) is wrapped in a HiveConnectorException with code LOAD_HIVE_BASE_HADOOP_CONFIG_FAILED and this generic message; the underlying cause is appended to the log.","triggerScenarios":"Invoking loadHiveBaseHadoopConfig when hadoop_conf_path points to a nonexistent directory, the XML files are malformed, or an IOException occurs while loading them as resources.","commonSituations":"Typo in hadoop_conf_path, config files not shipped to all cluster nodes (only on the client), wrong file permissions, or hand-edited XML with syntax errors.","solutions":["Check the log line right after this message for the wrapped cause (ExceptionUtils.getMessage(e)).","Verify hadoop_conf_path exists on ALL nodes and contains valid core-site.xml/hdfs-site.xml/hive-site.xml.","Validate XML well-formedness of each file (xmllint).","Fix file permissions so the SeaTunnel process user can read the config files.","If using inline hadoop_conf, confirm keys/values are valid Hadoop properties."],"exampleFix":"// before\nhadoop_conf_path = \"/etc/hadoop/conf-typo\"\n// after\nhadoop_conf_path = \"/etc/hadoop/conf\"","handlingStrategy":"try-catch","validationCode":"File dir = new File(hadoopConfPath);\nif (!dir.isDirectory()) throw new IllegalArgumentException(\"hadoop_conf_path not a directory: \" + hadoopConfPath);\nfor (String f : new String[]{\"core-site.xml\",\"hdfs-site.xml\",\"hive-site.xml\"}) {\n    File xml = new File(dir, f);\n    if (!xml.canRead()) throw new IllegalArgumentException(\"missing/unreadable: \" + xml);\n}","typeGuard":null,"tryCatchPattern":"try {\n    storage.loadHiveBaseHadoopConfig(readonlyConfig);\n} catch (HiveConnectorException e) {\n    LOG.error(\"hadoop conf load failed; check hadoop_conf_path files and permissions\", e.getCause());\n    throw new IllegalStateException(\"Fix hadoop config and resubmit\", e);\n}","preventionTips":["Validate XML with xmllint before deploying configs","Ship config files to all worker nodes, not just the client","Check the logged cause line immediately following this error for the root problem"],"tags":["hadoop","hive","config-load"],"backgroundTag":"config-file-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}