{"record":{"id":"2ef81f6181158b9b","repo":"apache/seatunnel","slug":"load-catalog","errorCode":"LOAD_CATALOG","errorMessage":"${e.message}","messagePattern":"\\$\\{e\\.message\\}","errorType":"error_code","errorClass":"PaimonConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/catalog/PaimonCatalogLoader.java","lineNumber":120,"sourceCode":"        final CatalogContext catalogContext =\n                CatalogContext.create(options, paimonHadoopConfiguration);\n        try {\n            // If paimon privilege enabled, there will be system tables named user.sys and\n            // privilege.sys in the warehouse.\n            // It returns a PrivilegedCatalog. Otherwise, it returns a CachingCatalog.\n            // If paimon privilege enabled, perform user and password verification accordingly.\n            Catalog catalog =\n                    PaimonSecurityContext.runSecured(\n                            () -> CatalogFactory.createCatalog(catalogContext));\n            if (catalog instanceof PrivilegedCatalog\n                    && StringUtils.isBlank(user)\n                    && StringUtils.isBlank(password)) {\n                throw new IllegalArgumentException(\n                        \"paimon privilege is enabled, user and password is required\");\n            }\n            return catalog;\n        } catch (Exception e) {\n            throw new PaimonConnectorException(\n                    PaimonConnectorErrorCode.LOAD_CATALOG, e.getMessage(), e);\n        }\n    }\n\n    void checkConfiguration(Configuration configuration, String key) {\n        Iterator<Map.Entry<String, String>> entryIterator = configuration.iterator();\n        while (entryIterator.hasNext()) {\n            Map.Entry<String, String> entry = entryIterator.next();\n            if (entry.getKey().equals(key)) {\n                if (StringUtils.isBlank(entry.getValue())) {\n                    throw new IllegalArgumentException(\"The value of\" + key + \" is required\");\n                }\n                return;\n            }\n        }\n        throw new IllegalArgumentException(key + \" is required\");\n    }\n}","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/catalog/PaimonCatalogLoader.java#L102-L138","documentation":"loadCatalog wraps any exception raised while creating the Paimon catalog into a SeaTunnel PaimonConnectorException with code LOAD_CATALOG, propagating the underlying exception's message. This is the generic failure path for catalog creation: bad warehouse path, invalid paimon-conf, metastore connection failures, the privilege credential check, plugin/config errors, etc. The real reason is in the message and wrapped cause.","triggerScenarios":"Any failure inside CatalogFactory.createCatalog(catalogContext) (via PaimonSecurityContext.runSecured) or in option parsing before it — e.g. unreachable Hive metastore, invalid warehouse path, Hadoop/Kerberos errors, missing user/password for PrivilegedCatalog.","commonSituations":"Wrong warehouse URI or filesystem not on the classpath; Hive metastore down or wrong URI; Kerberos/HDFS permission issues; missing paimon-conf-dir; invalid option names in the catalog config; Hadoop classes missing from the plugin install.","solutions":["Read the wrapped cause / e.getMessage() to identify the root failure and fix that underlying issue.","Verify warehouse path, catalog type (filesystem/hive), and paimon-conf-dir settings in the SeaTunnel config.","Check metastore/HDFS/Kerberos connectivity and credentials from the SeaTunnel node.","Ensure the Paimon connector plugin is correctly installed (install-plugin.sh) with matching Paimon/Hadoop versions."],"exampleFix":"// before\nPaimon {\n  warehouse = \"hdfs://wrong-ns/paimon\"\n}\n// after\nPaimon {\n  warehouse = \"hdfs://correct-ns/paimon\"\n  catalog-name = \"paimon\"\n  paimon-conf-dir = \"/opt/paimon/conf\"\n}","handlingStrategy":"try-catch","validationCode":"// pre-flight: verify conf and warehouse reachability\nFiles.checkAccess(Paths.get(paimonConfDir, \"paimon.properties\"));\n// e.g. ping Hive metastore URI / filesystem before loadCatalog()","typeGuard":null,"tryCatchPattern":"try {\n    Catalog c = loader.loadCatalog();\n} catch (PaimonConnectorException e) {\n    if (e.getErrorCode() == PaimonConnectorErrorCode.LOAD_CATALOG) {\n        LOG.error(\"catalog init failed: {}\", e.getCause(), e);\n    }\n    throw e;\n}","preventionTips":["Pre-flight check warehouse path, conf dir, and metastore connectivity","Keep Paimon/Hadoop plugin versions aligned via install-plugin.sh","Log the full cause chain — the message alone hides the root cause","Validate Kerberos/HDFS credentials from the SeaTunnel node itself"],"tags":["paimon","catalog","initialization","wrapped-exception"],"backgroundTag":"module-init-failed","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"}