theonedev/onedev · error · java.lang.IllegalArgumentException
Request string '{string}' is not a valid integer
Error message
Request string '{string}' is not a valid integer What it means
Wicket FormComponent.inputAsInt parses the request parameter with Integer.parseInt and wraps NumberFormatException into an IllegalArgumentException with a component-scoped message; the submitted string is not a valid integer.
Source
Thrown at server-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java:1380
* Gets the request parameter for this component as an int, using the given default in case no
* corresponding request parameter was found.
*
* @param defaultValue
* Default value to return if request does not have an integer for this component
* @return The value in the request for this component
*/
protected final int inputAsInt(final int defaultValue)
{
final String string = getInput();
if (string != null)
{
try
{
return Integer.parseInt(string);
}
catch (NumberFormatException e)
{
throw new IllegalArgumentException(exceptionMessage("Request string '" + string +
"' is not a valid integer"));
}
}
else
{
return defaultValue;
}
}
/**
* Gets the request parameters for this component as ints.
*
* @return The values in the request for this component
*/
protected final int[] inputAsIntArray()
{
final String[] strings = getInputAsArray();
if (strings != null)View on GitHub (pinned to d44925c47c)
Solutions
- Send an integer value for the form component's request parameter.
- Use inputAsInt(defaultValue) semantics: absent parameters are fine, but present ones must parse.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java:1380 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/262bb4fd6867fdcc.
Report an issue: GitHub.