{"record":{"id":"49e7c8181b66f46c","repo":"theonedev/onedev","slug":"internal-error-request-string-string-not-a-v","errorCode":null,"errorMessage":"Internal error.  Request string '{string}' not a valid integer","messagePattern":"Internal error\\.  Request string '(.+?)' not a valid integer","errorType":"exception","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java","lineNumber":1355,"sourceCode":"\t{\n\t\treturn getDefaultModelObjectAsString();\n\t}\n\n\t/**\n\t * Gets the request parameter for this component as an int.\n\t * \n\t * @return The value in the request for this component\n\t */\n\tprotected final int inputAsInt()\n\t{\n\t\tfinal String string = getInput();\n\t\ttry\n\t\t{\n\t\t\treturn Integer.parseInt(string);\n\t\t}\n\t\tcatch (NumberFormatException e)\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\texceptionMessage(\"Internal error.  Request string '\" + string +\n\t\t\t\t\t\"' not a valid integer\"));\n\t\t}\n\t}\n\n\t/**\n\t * Gets the request parameter for this component as an int, using the given default in case no\n\t * corresponding request parameter was found.\n\t * \n\t * @param defaultValue\n\t *            Default value to return if request does not have an integer for this component\n\t * @return The value in the request for this component\n\t */\n\tprotected final int inputAsInt(final int defaultValue)\n\t{\n\t\tfinal String string = getInput();\n\t\tif (string != null)\n\t\t{","sourceCodeStart":1337,"sourceCodeEnd":1373,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java#L1337-L1373","documentation":"FormComponent's internal integer conversion helper (used e.g. for request parameter indices) throws IllegalArgumentException with a message naming the offending string when Integer.parseInt fails. Reaching it means Wicket internals received a non-numeric request string that should have been numeric — effectively an internal invariant violation.","triggerScenarios":"A request parameter or rendered index string that Wicket expects to be an integer contains non-numeric content (corrupted/tampered request, malformed generated markup id/index, custom request coding mangling parameters).","commonSituations":"Custom IRequestCodingStrategy/URL mappers producing non-numeric segments where default coding expects indices; proxies or scripts rewriting request strings; corrupted bookmarkable/stateless URLs.","solutions":["Inspect the '{string}' value in the message to find which parameter is malformed","Check custom request coding / URL mappers that might alter numeric parameters","Reproduce with a clean request to rule out tampering or proxy URL rewriting","Update Wicket version if a known internal conversion bug matches your coding strategy"],"exampleFix":"// before\ncustom encoder writes /page/name-abc where numeric index expected\n// after\nencode only numeric segments for indexed parameters, e.g. /page/3","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"boolean isNumeric = s != null && s.matches(\"\\\\d+\");","tryCatchPattern":"try {\n    parseRequestIndex(param);\n} catch (IllegalArgumentException e) {\n    log.warn(\"Non-numeric request parameter: {}\", e.getMessage());\n    // reject or sanitize the request\n}","preventionTips":["Ensure custom request coders only emit numeric strings where Wicket expects indices","Check proxies/scripts that rewrite URLs","Keep Wicket updated for internal parsing fixes"],"tags":["wicket","request-parsing","integer"],"backgroundTag":"invalid-argument-format","analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}