{"record":{"id":"3cad4d13a0097f65","repo":"apache/dubbo","slug":"failed-to-override-field-value-of-config-bean-th","errorCode":null,"errorMessage":"Failed to override field value of config bean: <this>","messagePattern":"Failed to override field value of config bean: <this>","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java","lineNumber":710,"sourceCode":"                    if (overrideAll) {\n                        oldMap.forEach(newMap::putIfAbsent);\n                    } else {\n                        newMap.putAll(oldMap);\n                    }\n\n                    invokeSetParameters(newMap, this);\n                } else if (isNestedSetter(this, method)) {\n                    // not support\n                }\n\n            } catch (Throwable t) {\n                logger.error(\n                        COMMON_FAILED_OVERRIDE_FIELD,\n                        \"\",\n                        \"\",\n                        \"Failed to override field value of config bean: \" + this,\n                        t);\n                throw new IllegalStateException(\"Failed to override field value of config bean: \" + this, t);\n            }\n        }\n    }\n\n    /**\n     * Dubbo config property override\n     */\n    public void refresh() {\n        if (needRefresh) {\n            try {\n                // check and init before do refresh\n                preProcessRefresh();\n                refreshWithPrefixes(getPrefixes(), getConfigMode());\n            } catch (Exception e) {\n                logger.error(\n                        COMMON_FAILED_OVERRIDE_FIELD,\n                        \"\",\n                        \"\",","sourceCodeStart":692,"sourceCodeEnd":728,"githubUrl":"https://github.com/apache/dubbo/blob/3a3043227f5571d25eb2889de5bca22f2914843b/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java#L692-L728","documentation":"Thrown by the config-copy/override path in AbstractConfig (the loop that copies field values from a 'newOne' config bean onto 'this'). Any Throwable during reflective setter invocation or value conversion is logged and rethrown wrapped. The cause carries the real failure (e.g. type mismatch, inaccessible setter, NPE).","triggerScenarios":"During config merging/refresh, invoking a setter via reflection threw: argument type mismatch, IllegalAccessException, an NPE inside the setter, or a value conversion error. This happens when one config instance overrides another (e.g. defaults merge, programmatic copy).","commonSituations":"A config field type changed between versions but an old-style override is applied. A setter performs validation that rejects the incoming value. A reflective access failure under a restrictive module/security setup. Programmatic config objects in an inconsistent state being merged.","solutions":["Inspect the cause Throwable in the stack trace to identify the failing setter and value.","Ensure the config bean fields and setter signatures match the Dubbo version in use.","If a setter validates and rejects a value, correct the value at its source.","On Java module/SecurityManager restrictions, open the relevant package to Dubbo or remove the restriction."],"exampleFix":"// before\n// passing wrong-typed value to a config setter during merge\nconfig.setX((Object) someValue); // setter expects String\n// after\nconfig.setX(String.valueOf(someValue));","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    config.refresh(); // or config copy/override path\n} catch (IllegalStateException e) {\n    if (e.getMessage().startsWith(\"Failed to override field value of config bean\")) {\n        Throwable root = e.getCause();\n        // inspect root to find the failing setter/value\n    }\n    throw e;\n}","preventionTips":["Keep setter signatures and field types consistent with the Dubbo version.","Make setters null-safe and validate-friendly so merges don't throw.","Inspect the cause of wrapped override exceptions rather than the wrapper message."],"tags":["config","reflection","refresh","startup"],"backgroundTag":null,"analyzedSha":"3a3043227f5571d25eb2889de5bca22f2914843b","analyzedAt":"2026-08-14T00:43:19.853Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}