hibernate/hibernate-orm · error · IllegalArgumentException

Illegal value for hint '" + hintName + "'

Error message

Illegal value for hint '" + hintName + "'

What it means

Error "Illegal value for hint '" + hintName + "'" thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureCallImpl.java:444

		return this;
	}

	@Override
	@Nonnull
	public ProcedureCallImplementor<R> setHint(@Nonnull String hintName, @Nullable Object value) {
		checkNotClosed();
		super.setHint( hintName, value );
		return this;
	}

	@Override
	protected void applyCallableFunctionHint(String hintName, Object value) {
		if ( value instanceof Boolean bool && bool
			|| value instanceof String string && parseBoolean( string ) ) {
			applyCallableFunctionHint();
		}
		else {
			throw new IllegalArgumentException( "Illegal value for hint '" + hintName + "'" );
		}
	}

	@Override @SuppressWarnings("resource")
	protected void applyCallableFunctionTypeHint(String hintName, Object value) {
		if ( value instanceof Integer code ) {
			markAsFunctionCall( code );
		}
		else if ( value instanceof Type<?> type ) {
			markAsFunctionCall( type );
		}
		else if ( value instanceof Class<?> type ) {
			markAsFunctionCall( type );
		}
		else if ( value instanceof String string ) {
			markAsFunctionCall( parseInt( string ) );
		}
		else {

View on GitHub (pinned to fad1729dce)

Solutions

  1. Pass a value of the correct type for the hint (e.g. an integer for timeout hints).
  2. Consult the hint documentation and convert the value accordingly.

When it happens

Trigger: A runtime precondition of the Hibernate API is violated.

Common situations: Occurs when application code or configuration does not satisfy the documented contract of the API being called.


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