theonedev/onedev · error · org.apache.wicket.WicketRuntimeException

Exception '{e.getMessage()}' occurred during validation {val

Error message

Exception '{e.getMessage()}' occurred during validation {validator.getClass().getName()} on component {getPath()}

What it means

Wicket FormComponent.validate wraps any exception thrown by an attached IValidator into a WicketRuntimeException carrying the component path and validator class; it signals a validator crashed (a bug in the validator or bad input handling), not a normal validation failure.

Source

Thrown at server-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java:1581

			if (behavior instanceof ValidatorAdapter)
			{
				validator = ((ValidatorAdapter<T>)behavior).getValidator();
			}
			else if (behavior instanceof IValidator)
			{
				validator = (IValidator<T>)behavior;
			}
			if (validator != null)
			{
				if (isNull == false || validator instanceof INullAcceptingValidator<?>)
				{
					try
					{
						validator.validate(validatable);
					}
					catch (Exception e)
					{
						throw new WicketRuntimeException("Exception '" + e.getMessage() +
								"' occurred during validation " + validator.getClass().getName() +
								" on component " + getPath(), e);
					}
				}
				if (!isValid())
				{
					break;
				}
			}
		}
	}

	/**
	 * Creates an IValidatable that can be used to validate this form component. This validatable
	 * incorporates error key lookups that correspond to this form component.
	 * 
	 * This method is useful when validation needs to happen outside the regular validation workflow
	 * but error messages should still be properly reported against the form component.

View on GitHub (pinned to d44925c47c)

Solutions

  1. Inspect the wrapped cause to find the failing validator and fix its implementation.
  2. Ensure validators throw ValidationError rather than raw exceptions on invalid input.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at server-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java:1581 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/97152f3e4c06663d. Report an issue: GitHub.