hibernate/hibernate-orm · error · IllegalArgumentException

tag + " is not relevant for ProcedureCall"

Error message

tag + " is not relevant for ProcedureCall"

What it means

Error "tag + " is not relevant for ProcedureCall"" thrown in hibernate/hibernate-orm.

Source

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

		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 {
			throw new IllegalArgumentException( "Illegal value for hint '" + hintName + "'" );
		}
	}

	private void irrelevantHint(String tag) {
		throw new IllegalArgumentException( tag + " is not relevant for ProcedureCall" );
	}

	@Override
	protected void applyReadOnlyHint(String hintName, Object value) {
		irrelevantHint( "Read-only" );
	}

	@Override
	protected void applyFetchSizeHint(String hintName, Object value) {
		irrelevantHint( "Fetch-size" );
	}

	@Override
	protected void applyResultCachingHint(String hintName, Object value) {
		irrelevantHint( "Result-caching" );
	}

	@Override

View on GitHub (pinned to fad1729dce)

Solutions

  1. Remove setComment/setQueryHint tags that only apply to HQL queries from the procedure call.
  2. Use a regular Query if you need to attach a comment tag.

When it happens

Trigger: An API operation is invoked on an object that does not support it.

Common situations: Using query/procedure/proxy APIs beyond their supported feature set (e.g. scrolling, locking, unwrapping a procedure call).


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