{"record":{"id":"394bf4ce0edd10bf","repo":"apache/dubbo","slug":"address-is-not-allowed-to-be-empty-please-re-ente","errorCode":null,"errorMessage":"Address is not allowed to be empty, please re-enter.","messagePattern":"Address is not allowed to be empty, please re-enter\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"dubbo-common/src/main/java/org/apache/dubbo/common/utils/UrlUtils.java","lineNumber":85,"sourceCode":"import static org.apache.dubbo.common.constants.RegistryConstants.SERVICE_REGISTRY_TYPE;\n\npublic class UrlUtils {\n\n    /**\n     * Forbids the instantiation.\n     */\n    private UrlUtils() {\n        throw new UnsupportedOperationException(\"No instance of 'UrlUtils' for you! \");\n    }\n\n    /**\n     * in the url string,mark the param begin\n     */\n    private static final String URL_PARAM_STARTING_SYMBOL = \"?\";\n\n    public static URL parseURL(String address, Map<String, String> defaults) {\n        if (StringUtils.isEmpty(address)) {\n            throw new IllegalArgumentException(\"Address is not allowed to be empty, please re-enter.\");\n        }\n        String url;\n        if (address.contains(\"://\") || address.contains(URL_PARAM_STARTING_SYMBOL)) {\n            url = address;\n        } else {\n            String[] addresses = COMMA_SPLIT_PATTERN.split(address);\n            url = addresses[0];\n            if (addresses.length > 1) {\n                StringBuilder backup = new StringBuilder();\n                for (int i = 1; i < addresses.length; i++) {\n                    if (i > 1) {\n                        backup.append(',');\n                    }\n                    backup.append(addresses[i]);\n                }\n                url += URL_PARAM_STARTING_SYMBOL + RemotingConstants.BACKUP_KEY + \"=\" + backup.toString();\n            }\n        }","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/apache/dubbo/blob/3a3043227f5571d25eb2889de5bca22f2914843b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/UrlUtils.java#L67-L103","documentation":"Thrown by UrlUtils.parseURL(String address, Map defaults) when address is null or empty after trimming. The method is the primary entry point for parsing a Dubbo provider/registry address string into a URL object. An empty address means no endpoint was configured.","triggerScenarios":"Calling parseURL(\"\", defaults) or parseURL(null, defaults); address property resolved from configuration (dubbo.registry.address or dubbo.provider.address) that was not set; address string is entirely whitespace.","commonSituations":"Missing or commented-out registry address in dubbo.properties / application.yml / XML config; environment variable for the address not set in the deployment; address loaded from a config center that returned an empty string.","solutions":["Set the address property in configuration (e.g. dubbo.registry.address=zookeeper://127.0.0.1:2181).","Validate config at startup: assert StringUtils.isNotEmpty(config.getAddress()) before the framework calls parseURL.","Check environment variable / config center for the missing address key."],"exampleFix":"# before (application.properties)\n# dubbo.registry.address is missing\n\n# after\ndubbo.registry.address=zookeeper://127.0.0.1:2181","handlingStrategy":"validation","validationCode":"if (StringUtils.isEmpty(address)) {\n    throw new IllegalStateException(\"Registry/provider address is not configured\");\n}\nURL url = UrlUtils.parseURL(address, defaults);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set dubbo.registry.address in configuration.","Validate config at application startup before the framework parses URLs."],"tags":["url-parsing","configuration","registry","dubbo-common"],"backgroundTag":null,"analyzedSha":"3a3043227f5571d25eb2889de5bca22f2914843b","analyzedAt":"2026-08-14T00:43:19.853Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}