{"record":{"id":"eb8ca175e3eba517","repo":"apache/dubbo","slug":"append-parameters-failed-message","errorCode":null,"errorMessage":"Append parameters failed: <message>","messagePattern":"Append parameters failed: <message>","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java","lineNumber":268,"sourceCode":"                    if (asParameters) {\n                        // put all parameters to url\n                        parameters.putAll(map);\n                    } else {\n                        // encode parameters to string for config overriding, see AbstractConfig#refresh()\n                        String key = calculatePropertyFromGetter(name);\n                        String encodeParameters = StringUtils.encodeParameters(map);\n                        if (encodeParameters != null) {\n                            parameters.put(key, encodeParameters);\n                        }\n                    }\n                } else if (isNestedGetter(config, method)) {\n                    Object inner = method.invoke(config);\n                    String fieldName = MethodUtils.extractFieldName(method);\n                    String nestedPrefix = prefix == null ? fieldName : prefix + \".\" + fieldName;\n                    appendParameters0(parameters, inner, nestedPrefix, asParameters);\n                }\n            } catch (Exception e) {\n                throw new IllegalStateException(\"Append parameters failed: \" + e.getMessage(), e);\n            }\n        }\n    }\n\n    protected static String extractPropertyName(String setter) {\n        String propertyName = setter.substring(\"set\".length());\n        propertyName = propertyName.substring(0, 1).toLowerCase() + propertyName.substring(1);\n        return propertyName;\n    }\n\n    private static String calculatePropertyToGetter(String name) {\n        return \"get\" + name.substring(0, 1).toUpperCase() + name.substring(1);\n    }\n\n    private static String calculatePropertyToSetter(String name) {\n        return \"set\" + name.substring(0, 1).toUpperCase() + name.substring(1);\n    }\n","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/apache/dubbo/blob/3a3043227f5571d25eb2889de5bca22f2914843b/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java#L250-L286","documentation":"Thrown by AbstractConfig.appendParameters0 as a catch-all: any exception raised while invoking a getter or building a parameter entry inside the bean-property loop is wrapped in this IllegalStateException. The root cause is attached, and its message is appended. This is a generic failure wrapper, so the real problem is in cause.getMessage().","triggerScenarios":"A getter on the config bean threw (NullPointerException, IllegalArgumentException, an SPI/reflective error), or a value conversion/encoding step failed while appendParameters0 iterated the bean's getters. Triggered during URL assembly at export/reference time.","commonSituations":"A config getter returned an object whose toString() or further processing threw. A @Parameter(escaped=true) value failed URL encoding. A nested config object was in an inconsistent state. A custom config subclass getter threw an unexpected exception.","solutions":["Read the cause (and cause.getMessage() embedded in the message) to find the actual failing getter/operation.","Reproduce with logging around appendParameters to see which property's getter fails.","Fix the root cause identified by the cause exception (null field, bad value, etc.).","If a custom config subclass getter throws, make it null-safe or guard its logic."],"exampleFix":"// before\n// custom config getter throws NPE because inner field is null\npublic String getCustom() { return inner.toString(); }\n// after\npublic String getCustom() { return inner == null ? null : inner.toString(); }","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    URL url = ...; // triggers appendParameters\n} catch (IllegalStateException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"Append parameters failed\")) {\n        Throwable root = e.getCause();\n        // root.getMessage() identifies the failing getter/value — fix that\n    }\n    throw e;\n}","preventionTips":["Make custom config getters null-safe (return null instead of NPE).","Keep config bean fields consistent with their getters.","Read the cause of wrapped exceptions to find the real failure."],"tags":["config","url-parameters","reflection","startup"],"backgroundTag":null,"analyzedSha":"3a3043227f5571d25eb2889de5bca22f2914843b","analyzedAt":"2026-08-14T00:43:19.853Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}