{"record":{"id":"2da05517713af8fc","repo":"oracle/graal","slug":"invalid-jdwp-option-address-value-port-is-not","errorCode":null,"errorMessage":"Invalid JDWP option, address: {value}. Port is not a number. Must be a number in the 0 - 65535 range.","messagePattern":"Invalid JDWP option, address: (.+?)\\. Port is not a number\\. Must be a number in the 0 - 65535 range\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/EspressoOptions.java","lineNumber":438,"sourceCode":"                String value = keyValue.substring(equalsIndex + 1);\n                switch (key) {\n                    case \"address\":\n                        String inputHost = null;\n                        int inputPort = 0;\n                        if (!value.isEmpty()) {\n                            int colonIndex = value.indexOf(':');\n                            if (colonIndex > 0) {\n                                inputHost = value.substring(0, colonIndex);\n                            }\n                            String portStr = value.substring(colonIndex + 1);\n                            long realValue;\n                            try {\n                                realValue = Long.valueOf(portStr);\n                                if (realValue < 0 || realValue > 65535) {\n                                    throw new IllegalArgumentException(\"Invalid JDWP option, address: \" + value + \". Must be in the 0 - 65535 range.\");\n                                }\n                            } catch (NumberFormatException ex) {\n                                throw new IllegalArgumentException(\"Invalid JDWP option, address: \" + value + \". Port is not a number. Must be a number in the 0 - 65535 range.\");\n                            }\n                            inputPort = (int) realValue;\n                        }\n                        host = inputHost;\n                        port = inputPort;\n                        break;\n                    case \"transport\":\n                        if (!\"dt_socket\".equals(value)) {\n                            throw new IllegalArgumentException(\"Invalid transport \" + value + \". Espresso only supports dt_socket currently.\");\n                        }\n                        transport = value;\n                        break;\n                    case \"server\":\n                        server = yesOrNo(key, value);\n                        break;\n                    case \"suspend\":\n                        suspend = yesOrNo(key, value);\n                        break;","sourceCodeStart":420,"sourceCodeEnd":456,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/EspressoOptions.java#L420-L456","documentation":"While parsing the JDWP 'address' value, the substring after ':' is parsed with Long.valueOf; a NumberFormatException (non-numeric port text) is converted into this IllegalArgumentException telling the user the port must be a number in 0-65535.","triggerScenarios":"--java.JDWPOptions=...,address=localhost:jdwp or address=host:8000extra or an IPv6-looking value whose colons make the port substring non-numeric.","commonSituations":"Passing hostnames with colons or IPv6 addresses (unsupported format); stale placeholder text left in the address; extra characters after the port from copy-paste.","solutions":["Format the address as [<host>:]<port> with a purely numeric port, e.g. address=:8000.","For IPv6, use the bracketed host form supported by your platform's JDWP or bind via hostname.","Strip whitespace and placeholder text from generated option strings."],"exampleFix":"# before\n--java.JDWPOptions=transport=dt_socket,address=localhost:PORT_PLACEHOLDER\n\n# after\n--java.JDWPOptions=transport=dt_socket,address=localhost:8000","handlingStrategy":"validation","validationCode":"if (!portStr.chars().allMatch(Character::isDigit)) throw new ConfigException(\"Port must be numeric\");","typeGuard":"static boolean numericPort(String p) { return p != null && p.matches(\"\\\\d+\"); }","tryCatchPattern":null,"preventionTips":["Use host:port format only; no IPv6 raw addresses in the JDWP address option.","Substitute real values for placeholders before launching."],"tags":["espresso","graalvm","jdwp","debugging","port","configuration"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}