quarkusio/quarkus · error · IllegalStateException
Unable to find the base class for <name>
Error message
Unable to find the base class for <name>
What it means
Fires inside the predicate passed to GeneratedClassGizmo2Adaptor when generating interceptor-initializer classes for intercepted static methods: while laying out org.acme.Foo_InterceptorInitializer (and its potential anonymous nested classes), the processor cannot resolve the base class <name> that the generated initializer should extend or reference. It signals that the Jandex index used for bytecode generation does not contain the named base class, typically because the class was not indexed or comes from an unindexed dependency.
Source
Thrown at extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/staticmethods/InterceptedStaticMethodsProcessor.java:214
ClassOutput classOutput = new GeneratedClassGizmo2Adaptor(generatedClasses, generatedResources,
generatedServiceProviders, new Predicate<String>() {
@Override
public boolean test(String name) {
if (InterceptedStaticMethodsRecorder.INITIALIZER_CLASS_NAME.equals(name)) {
return true;
}
// for base org.acme.Foo we generate org.acme.Foo_InterceptorInitializer
// and possibly anonymous classes like org.acme.Foo_InterceptorInitializer$$function$$1
DotName base = null;
for (Map.Entry<DotName, String> e : baseToGeneratedInitializer.entrySet()) {
if (name.equals(e.getValue()) || name.startsWith(e.getValue())) {
base = e.getKey();
}
}
if (base == null) {
throw new IllegalStateException("Unable to find the base class for " + name);
}
return applicationClassPredicate.test(base);
}
});
Gizmo gizmo = Gizmo.create(classOutput);
// declaring class -> intercepted static methods
Map<DotName, List<InterceptedStaticMethodBuildItem>> interceptedStaticMethodsMap = new HashMap<>();
for (InterceptedStaticMethodBuildItem interceptedStaticMethod : interceptedStaticMethods) {
List<InterceptedStaticMethodBuildItem> list = interceptedStaticMethodsMap.computeIfAbsent(
interceptedStaticMethod.getTarget().name(), k -> new ArrayList<>());
list.add(interceptedStaticMethod);
}
// For each declaring class create an initializer class that:
// 1. registers all interceptor chains inside an "init_static_intercepted_methods" method
// 2. adds static methods to invoke the interceptor chain and delegate to the copy of the original static method
// declaring class -> initializer classView on GitHub (pinned to e1c734241f)
Solutions
- Verify the base class is on the application classpath and included in the Jandex index used at build time
- Add the jar containing the class as a GAV dependency with 'jar' packaging so Quarkus indexes it, or apply @IndexDependencies to force indexing of the otherwise unindexed artifact
- Rebuild with a clean target directory so stale generated-class state does not reference a removed class
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/staticmethods/InterceptedStaticMethodsProcessor.java:214 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/c9a7088f51b0a84a.
Report an issue: GitHub.