quarkusio/quarkus · error · IllegalStateException

InitiatorList requires for Hibernate Reactive but Hibernate

Error message

InitiatorList requires for Hibernate Reactive but Hibernate Reactive extension is not around?

What it means

RecordableBootstrapFactory chooses the service initiator list based on whether the persistence unit is reactive. If a PU is marked reactive but no Hibernate Reactive initiator-list provider was registered (the quarkus-hibernate-reactive extension is absent), boot fails with this IllegalStateException — the ORM extension alone cannot boot a reactive PU.

Source

Thrown at extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/boot/RecordableBootstrapFactory.java:31

import io.quarkus.hibernate.orm.runtime.service.FlatClassLoaderService;
import io.quarkus.hibernate.orm.runtime.service.InitialInitiatorListProvider;
import io.quarkus.hibernate.orm.runtime.service.StandardHibernateORMInitiatorListProvider;

final class RecordableBootstrapFactory {

    private static final InitialInitiatorListProvider reactiveInitiatorListProvider = initReactiveListProviderMaybe();
    private static final InitialInitiatorListProvider classicInitiatorListProvider = new StandardHibernateORMInitiatorListProvider();

    public static RecordableBootstrap createRecordableBootstrapBuilder(QuarkusPersistenceUnitDefinition puDefinition) {
        final BootstrapServiceRegistry bsr = buildBootstrapServiceRegistry();
        final RecordableBootstrap ssrBuilder = new RecordableBootstrap(bsr, getInitiatorListProvider(puDefinition));
        return ssrBuilder;
    }

    private static InitialInitiatorListProvider getInitiatorListProvider(QuarkusPersistenceUnitDefinition puDefinition) {
        if (puDefinition.isReactive()) {
            if (reactiveInitiatorListProvider == null) {
                throw new IllegalStateException(
                        "InitiatorList requires for Hibernate Reactive but Hibernate Reactive extension is not around?");
            }
            return reactiveInitiatorListProvider;
        } else {
            return classicInitiatorListProvider;
        }
    }

    private static BootstrapServiceRegistry buildBootstrapServiceRegistry() {
        final ClassLoaderService providedClassLoaderService = FlatClassLoaderService.INSTANCE;
        // N.B. support for custom IntegratorProvider injected via Properties (as
        // instance) removed

        final QuarkusIntegratorServiceImpl integratorService = new QuarkusIntegratorServiceImpl(providedClassLoaderService);
        final StrategySelector strategySelector = QuarkusStrategySelectorBuilder.buildSelector(providedClassLoaderService);
        return new BootstrapServiceRegistryImpl(true, providedClassLoaderService, strategySelector, integratorService);
    }

View on GitHub (pinned to e1c734241f)

Solutions

  1. Add the quarkus-hibernate-reactive dependency to the application.
  2. Or mark the persistence unit as non-reactive if blocking Hibernate ORM is intended.
  3. Audit configuration/properties that set the PU reactive and remove them if the reactive extension is intentionally absent.

Example fix

<!-- before (pom.xml) -->
<dependency>io.quarkus:quarkus-hibernate-orm</dependency> <!-- PU is reactive, missing reactive ext -->
<!-- after -->
<dependency>io.quarkus:quarkus-hibernate-orm</dependency>
<dependency>io.quarkus:quarkus-hibernate-reactive</dependency>
Defensive patterns

Strategy: validation

Validate before calling

// Guard before marking a PU reactive
if (puDefinition.isReactive() && !Class.forName("io.quarkus.hibernate.reactive.runtime.RecordableBootstrapFactory$ReactiveInitiatorListProvider", false, getClass().getClassLoader()).desiredAssertionStatus()) {
    // simpler: check dependency presence at build time
}
// Simplest check: ensure quarkus-hibernate-reactive is a dependency when any PU is reactive

Try / catch

try {
    bootPersistenceUnit();
} catch (IllegalStateException e) {
    if (e.getMessage().contains("Hibernate Reactive")) {
        log.error("Add io.quarkus:quarkus-hibernate-reactive or make the PU non-reactive");
    }
}

Prevention

When it happens

Trigger: A persistence unit is defined as reactive (isReactive() true, e.g. via quarkus.hibernate.orm... reactive-flavored definitions used by Hibernate Reactive) while the application has quarkus-hibernate-orm on the classpath but NOT quarkus-hibernate-reactive.

Common situations: Switching an app to Hibernate Reactive (reactive SQL clients, Panache Reactive) without adding the quarkus-hibernate-reactive dependency; a transitive configuration marking PUs reactive; leftover reactive PU config after removing the reactive extension.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/d574d4529d9d19ba. Report an issue: GitHub.