quarkusio/quarkus · error · IllegalArgumentException
Arc container was null
Error message
Arc container was null
What it means
Fires in ArcRecorder.initBeanContainer when the ArC CDI container reference obtained from Arc.container() is null at the point the runtime is initializing synthetic bean providers and the bean container. The container is created earlier during STATIC_INIT by container(); a null value at this stage means the container lifecycle was not started or was already shut down (e.g., initialization ordering problem or a duplicate/failed startup), so wiring synthetic beans cannot proceed.
Source
Thrown at extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/ArcRecorder.java:83
Arc.setExecutor(executor);
}
public void initStaticSupplierBeans(Map<String, Function<SyntheticCreationalContext<?>, ?>> creationFunctions,
Map<String, Supplier<ActiveResult>> checkActiveSuppliers) {
syntheticBeanProviders = new ConcurrentHashMap<>(creationFunctions);
syntheticBeanCheckActive = new ConcurrentHashMap<>(checkActiveSuppliers);
}
public void initRuntimeSupplierBeans(Map<String, Function<SyntheticCreationalContext<?>, ?>> creationFunctions,
Map<String, Supplier<ActiveResult>> checkActiveSuppliers) {
syntheticBeanProviders.putAll(creationFunctions);
syntheticBeanCheckActive.putAll(checkActiveSuppliers);
}
public BeanContainer initBeanContainer(ArcContainer container, List<BeanContainerListener> listeners)
throws Exception {
if (container == null) {
throw new IllegalArgumentException("Arc container was null");
}
BeanContainer beanContainer = new BeanContainerImpl(container);
for (BeanContainerListener listener : listeners) {
long start = System.currentTimeMillis();
listener.created(beanContainer);
LOG.debugf("Bean container listener %s finished in %s ms", listener.getClass().getName(),
System.currentTimeMillis() - start);
}
return beanContainer;
}
public void handleLifecycleEvents(ShutdownContext context, LaunchMode launchMode,
boolean disableApplicationLifecycleObservers) {
ArcContainerImpl container = ArcContainerImpl.instance();
List<Class<?>> mockBeanClasses;
// If needed then mock all app observers in the test mode
if (launchMode == LaunchMode.TEST && disableApplicationLifecycleObservers) {View on GitHub (pinned to e1c734241f)
Solutions
- Check startup logs above this error for an earlier CDI container bootstrap failure that left the container unset
- Ensure no extension or test code shuts down the Arc container before runtime initialization completes
- Reproduce with a minimal set of extensions to find which one disrupts the container startup order
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/ArcRecorder.java:83 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/44bcefc62c688c87.
Report an issue: GitHub.