hibernate/hibernate-orm · error · HibernateException

Filter parameter '{}' has neither an argument nor a resolver

Error message

Filter parameter '{}' has neither an argument nor a resolver

What it means

Error "Filter parameter '{}' has neither an argument nor a resolver" thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/internal/FilterImpl.java:198

	public Supplier<?> getParameterResolver(String name) {
		return definition.getParameterResolver(name);
	}

	/**
	 * Perform validation of the filter state.  This is used to verify the
	 * state of the filter after its enablement and before its use.
	 *
	 * @throws HibernateException If the state is not currently valid.
	 */
	public void validate() throws HibernateException {
		if ( validated ) {
			return;
		}
		// for each of the defined parameters, make sure its argument
		// has been set or a resolver has been implemented and specified
		for ( final String parameterName : definition.getParameterNames() ) {
			if ( !hasArgument(parameterName) && !hasResolver(parameterName)) {
				throw new HibernateException( "Filter parameter '" + getName()
						+ "' has neither an argument nor a resolver" );
			}
		}
		validated = true;
	}

	private boolean hasResolver(String parameterName) {
		final Supplier<?> resolver = getParameterResolver(parameterName);
		return resolver != null
			&& !resolver.getClass().isInterface();
	}

	private boolean hasArgument(String parameterName) {
		return parameters != null && parameters.containsKey(parameterName);
	}

	@Override
	public Object getParameterValue(String paramName) {

View on GitHub (pinned to fad1729dce)

Solutions

  1. Set a value (or resolver) for the filter parameter before executing the query.

When it happens

Trigger: Thrown when a filter is given a parameter that is not declared, of the wrong type, or lacking a value.

Common situations: Typical situations: typos in filter parameter names; setting a parameter of an incompatible Java type; forgetting to bind a parameter before running the query.


AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22). Data as JSON: /api/errors/1b0572d66b3707dc. Report an issue: GitHub.