quarkusio/quarkus · error · UnsupportedOperationException
Hints not supported yet
Error message
Hints not supported yet
What it means
withHint(String,Object) on the Hibernate Reactive Panache query impl accepts the hint into its map but then unconditionally throws UnsupportedOperationException("Hints not supported yet"). Query hints are simply not implemented for Hibernate Reactive Panache yet; the method exists for API parity with the blocking variant. Any call to it fails regardless of arguments.
Source
Thrown at extensions/panache/hibernate-reactive-panache-common/runtime/src/main/java/io/quarkus/hibernate/reactive/panache/common/runtime/CommonAbstractPanacheQueryImpl.java:240
throw new UnsupportedOperationException("Cannot call a range related method, " +
"call range(int, int) to initiate range first");
}
if (page != null) {
throw new UnsupportedOperationException("Cannot call a range related method in a paged query, " +
"call range(int, int) to initiate range first");
}
}
public void withLock(LockModeType lockModeType) {
this.lockModeType = lockModeType;
}
public void withHint(String hintName, Object value) {
if (hints == null) {
hints = new HashMap<>();
}
hints.put(hintName, value);
throw new UnsupportedOperationException("Hints not supported yet");
}
// Results
@SuppressWarnings("unchecked")
public Uni<Long> count() {
if (count == null) {
// FIXME: question about caching the result here
count = em.flatMap(session -> {
if (customCountQueryForSpring != null) {
Mutiny.SelectionQuery<Long> countQuery = session.createSelectionQuery(customCountQueryForSpring,
Long.class);
if (paramsArrayOrMap instanceof Map)
AbstractJpaOperations.bindParameters(countQuery, (Map<String, Object>) paramsArrayOrMap);
else
AbstractJpaOperations.bindParameters(countQuery, (Object[]) paramsArrayOrMap);
return applyFilters(session, () -> countQuery.getSingleResult());
} else {View on GitHub (pinned to e1c734241f)
Solutions
- Remove the withHint(...) call; there is no reactive Panache support yet.
- Set equivalent configuration via Hibernate Reactive session/persistence-unit properties in application.properties (e.g. SQL/logging settings) rather than per-query hints.
- For fetch-size-like behavior, restructure the query (fetch joins, limits) instead of relying on hints.
- Track upstream Hibernate Reactive support for query hints before re-adding the call.
Example fix
// before
PanacheQuery<Person> q = Person.find("age > ?1", 18).withHint("org.hibernate.fetchSize", 50);
// after
PanacheQuery<Person> q = Person.find("age > ?1", 18); // hints not supported reactively Defensive patterns
Strategy: validation
Validate before calling
// never call withHint on hibernate-reactive Panache queries Objects.requireNonNull(hintName); // not sufficient — method always throws; remove the call
Try / catch
try { query.withHint(name, value); } catch (UnsupportedOperationException e) { log.warn("Hints unsupported on hibernate-reactive Panache; ignored"); } Prevention
- Do not port withHint() calls from blocking Panache to hibernate-reactive Panache
- Apply equivalent settings via persistence-unit properties in application.properties
- Check the Hibernate Reactive issue tracker for hint support before using this API
When it happens
Trigger: Any call to PanacheQuery.withHint(String hintName, Object value) on a Hibernate Reactive Panache query.
Common situations: Porting blocking Hibernate ORM Panache code (where withHint works) to hibernate-reactive-panache; adding cache/lock hints like org.hibernate.cacheable or org.hibernate.fetchSize copied from blocking code.
Related errors
- Cannot call a page related method, call page(Page) or page(i
- Cannot call a page related method in a ranged query, call pa
- Cannot call a range related method, call range(int, int) to
- Cannot call a range related method in a paged query, call ra
- Not supported yet upstream
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/ba76608ccf4ba4f7.
Report an issue: GitHub.