{"record":{"id":"705c6c8e81c27603","repo":"apache/seatunnel","slug":"failed-to-create-retryingmetastoreclient-proxy-fa","errorCode":null,"errorMessage":"Failed to create RetryingMetaStoreClient proxy, falling back to HiveMetaStoreClient","messagePattern":"Failed to create RetryingMetaStoreClient proxy, falling back to HiveMetaStoreClient","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/utils/HiveMetaStoreCatalog.java","lineNumber":253,"sourceCode":"            if (getProxyMethod == null) {\n                log.warn(RETRYING_METASTORE_CLIENT_NO_COMPATIBLE_GET_PROXY_MESSAGE);\n                return null;\n            }\n\n            Object proxy = getProxyMethod.invoke(null, hiveConf, true);\n            if (proxy instanceof IMetaStoreClient) {\n                log.info(\n                        \"Using RetryingMetaStoreClient for Hive metastore connection [uris={}]\",\n                        hiveConf.get(\"hive.metastore.uris\"));\n                return (IMetaStoreClient) proxy;\n            }\n            log.warn(RETRYING_METASTORE_CLIENT_NO_COMPATIBLE_GET_PROXY_MESSAGE);\n            return null;\n        } catch (ClassNotFoundException e) {\n            log.debug(\"RetryingMetaStoreClient not found, falling back to HiveMetaStoreClient\", e);\n            return null;\n        } catch (Exception e) {\n            log.warn(\n                    \"Failed to create RetryingMetaStoreClient proxy, falling back to HiveMetaStoreClient\",\n                    e);\n            return null;\n        }\n    }\n\n    private static Method getProxyMethod(Class<?> clazz) {\n        // Hive 2.x: getProxy(HiveConf, boolean)\n        // Hive 3.x: getProxy(Configuration, boolean)\n        Method method = null;\n        try {\n            method = clazz.getDeclaredMethod(\"getProxy\", HiveConf.class, boolean.class);\n        } catch (NoSuchMethodException ignored) {\n        }\n        if (method == null) {\n            try {\n                method = clazz.getDeclaredMethod(\"getProxy\", Configuration.class, boolean.class);\n            } catch (NoSuchMethodException ignored) {","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/utils/HiveMetaStoreCatalog.java#L235-L271","documentation":"While creating the RetryingMetaStoreClient proxy reflectively, an unexpected exception occurred (InvocationTargetException from getProxy, security/illegal access, etc.). The catalog logs this warning with the cause and falls back to instantiating a plain HiveMetaStoreClient; the metastore client still works but without the retry wrapper.","triggerScenarios":"tryCreateRetryingClient() catches Exception from getProxyMethod.invoke(null, hiveConf, true) — e.g. the underlying HiveMetaStoreClient constructor inside the proxy failed (bad metastore URIs), reflection access restrictions, or missing transitive Hive classes.","commonSituations":"Metastore misconfiguration surfaced through the proxy factory, Java module/access restrictions on newer JDKs, incomplete Hive dependency set.","solutions":["Read the logged cause 'e' — it names the real failure (often metastore connect or missing class)","Fix the underlying metastore configuration (uris, auth) that made the proxy creation fail","If caused by reflection limits, run on a JDK or with flags permitting the reflective access","Verify the Hive client jars are complete and consistent; then rely on the fallback or align versions"],"exampleFix":"// before\n\"hive.metastore.uris\" = \"\" // empty causes proxy creation failure\n// after\n\"hive.metastore.uris\" = \"thrift://metastore-host:9083\"","handlingStrategy":"try-catch","validationCode":"try {\n  new HiveMetaStoreClient(hiveConf).close(); // fails fast with the real cause\n} catch (MetaException e) {\n  throw new IllegalStateException(\"Metastore config invalid: \" + e.getMessage(), e);\n}","typeGuard":null,"tryCatchPattern":"try {\n  client = (IMetaStoreClient) getProxyMethod.invoke(null, hiveConf, true);\n} catch (Exception e) {\n  log.warn(\"RetryingMetaStoreClient proxy failed; using HiveMetaStoreClient\", e);\n  client = new HiveMetaStoreClient(hiveConf);\n}","preventionTips":["Always read the logged cause 'e' — it carries the true metastore failure","Validate hive.metastore.uris before job submission","Run on a JDK that permits the needed reflective access","Ensure the full Hive client dependency tree is shipped"],"tags":["hive","reflection","metastore","fallback"],"backgroundTag":"class-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"}