{"record":{"id":"6d680b1a27365178","repo":"apache/seatunnel","slug":"hadoop-found-on-classpath-but-could-not-create-con","errorCode":null,"errorMessage":"Hadoop found on classpath but could not create config, proceeding without config","messagePattern":"Hadoop found on classpath but could not create config, proceeding without config","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/IcebergCatalogLoader.java","lineNumber":120,"sourceCode":"                                } catch (IOException e) {\n                                    log.warn(\n                                            \"Error adding Hadoop resource {}, resource was not added\",\n                                            path,\n                                            e);\n                                }\n                            }\n                        });\n            }\n            config.getHadoopProps().forEach(setMethod::invoke);\n            // kerberos authentication\n            doKerberosLogin((Configuration) result);\n            log.info(\"Hadoop config initialized: {}\", configClass.getName());\n            return result;\n        } catch (InstantiationException\n                | IllegalAccessException\n                | NoSuchMethodException\n                | InvocationTargetException e) {\n            log.warn(\n                    \"Hadoop found on classpath but could not create config, proceeding without config\",\n                    e);\n        }\n        return null;\n    }\n\n    /**\n     * kerberos authentication\n     *\n     * @param configuration Configuration\n     */\n    private Configuration doKerberosLogin(Configuration configuration) {\n        String kerberosKrb5ConfPath = config.getKerberosKrb5ConfPath();\n        String kerberosKeytabPath = config.getKerberosKeytabPath();\n        String kerberosPrincipal = config.getKerberosPrincipal();\n\n        if (StringUtils.isNotEmpty(kerberosPrincipal)\n                && StringUtils.isNotEmpty(kerberosKrb5ConfPath)","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/IcebergCatalogLoader.java#L102-L138","documentation":"This warning is emitted by IcebergCatalogLoader.loadHadoopConfig() when Hadoop classes are present on the classpath but instantiating the Hadoop Configuration object (reflectively, e.g. new Configuration()) fails with InstantiationException, IllegalAccessException, NoSuchMethodException, or InvocationTargetException. The loader proceeds with a null config, so the catalog runs without Hadoop settings — often breaking HDFS-backed catalogs.","triggerScenarios":"Reflection-based construction of the Hadoop Configuration class throws one of the caught reflective exceptions inside loadHadoopConfig(), called from loadCatalog().","commonSituations":"Mixed/shaded Hadoop versions on the classpath (hadoop-common vs shaded client conflicts); Configuration constructor signature changes across Hadoop versions; fat jars with conflicting hadoop-common copies; incomplete plugin jars missing hadoop dependencies.","solutions":["Check the attached exception stack trace to identify the reflective failure (usually ClassNotFound/NoSuchMethod from version conflicts).","Align Hadoop versions: use a single consistent hadoop-client set matching your cluster, and avoid multiple hadoop-common jars on the classpath.","As a fallback, pass required Hadoop settings explicitly via connector options (e.g. catalog impl, warehouse, fs settings) that do not depend on the config object."],"exampleFix":"// before\n# $SEATUNNEL_HOME/lib contains hadoop-common-2.6.0.jar and hadoop-client-api-3.3.4.jar\n// after\n# remove the older conflicting jar\nrm $SEATUNNEL_HOME/lib/hadoop-common-2.6.0.jar\nsh bin/seatunnel.sh --config job.config -e local","handlingStrategy":"try-catch","validationCode":"URL[] jars = classpath hadoop-common jars;\nif (distinctVersions(jars).count() > 1) throw new IllegalStateException(\"Conflicting hadoop-common versions on classpath\");","typeGuard":null,"tryCatchPattern":"try {\n    Configuration conf = new Configuration();\n} catch (Throwable e) {\n    log.error(\"Hadoop Configuration creation failed - check for hadoop jar conflicts\", e);\n    throw e;\n}","preventionTips":["Keep exactly one consistent Hadoop version in $SEATUNNEL_HOME/lib and plugin dirs","Avoid mixing hadoop-common and shaded hadoop-client-api jars","Pin Hadoop jars to match your cluster version","Inspect the reflective exception stack trace when this warning appears"],"tags":["hadoop","iceberg","classpath","reflection"],"backgroundTag":"missing-dependency","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}