quarkusio/quarkus · error · IllegalStateException

Decorated type not found in the bean archive index: ${decora

Error message

Decorated type not found in the bean archive index: ${decoratedType}

What it means

To implement a decorator's abstract methods for each decorated type, Arc looks the decorated interface up in the bean archive index. If the index (built from application classes) does not contain the interface, Arc cannot synthesize the implementation and throws this IllegalStateException.

Source

Thrown at independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/DecoratorGenerator.java:296

                        decoratorMethods.add(decoratorMethod);
                    }
                }

                if (!clazz.isInterface() && clazz.superName() != null) {
                    worklist.add(index.getClassByName(clazz.superName()));
                }
                for (DotName iface : clazz.interfaceNames()) {
                    worklist.add(index.getClassByName(iface));
                }
            }

            // Find non-decorated methods from all decorated types
            Set<MethodDesc> abstractMethods = new HashSet<>();
            Map<MethodDesc, MethodDesc> bridgeMethods = new HashMap<>();
            for (Type decoratedType : decorator.getDecoratedTypes()) {
                ClassInfo decoratedInterface = index.getClassByName(decoratedType.name());
                if (decoratedInterface == null) {
                    throw new IllegalStateException("Decorated type not found in the bean archive index: " + decoratedType);
                }

                // A decorated type can declare type parameters
                // For example Converter<String> should result in a T -> String mapping
                boolean isDecoratedInterfaceGeneric = !decoratedInterface.typeParameters().isEmpty();
                Map<String, Type> resolvedTypeParameters = Types.resolveDecoratedTypeParams(decoratedInterface, decorator);

                for (MethodInfo method : decoratedInterface.methods()) {
                    if (Methods.skipForDelegateSubclass(method)) {
                        continue;
                    }
                    MethodDesc methodDesc = methodDescOf(method);

                    // Create a resolved descriptor variant if a param contains a type variable
                    // E.g. ping(T) -> ping(String)
                    MethodDesc resolvedMethodDesc;
                    if (isDecoratedInterfaceGeneric && (Methods.containsTypeVariableParameter(method)
                            || Types.containsTypeVariable(method.returnType()))) {

View on GitHub (pinned to e1c734241f)

Solutions

  1. Ensure the decorated interface is on the application classpath so it gets indexed
  2. Add a Jandex index (jandex-maven-plugin or META-INF/jandex.idx) to the library providing the interface
  3. Check quarkus.index-dependency / index inclusion configuration for that dependency
  4. Clean rebuild so the index is regenerated

Example fix

// before: library without index
// after (library pom)
<plugin>
  <groupId>io.smallrye</groupId>
  <artifactId>jandex-maven-plugin</artifactId>
</plugin>
Defensive patterns

Strategy: validation

Validate before calling

// verify the decorated interface is in the Jandex index before use
// e.g. run: mvn io.smallrye:jandex-maven-plugin:jandex -pl :my-lib
// and confirm META-INF/jandex.idx contains the interface

Prevention

When it happens

Trigger: A decorator implements a decorated interface that is not part of any indexed bean archive - e.g. generated at runtime, missing from the Jandex index, or excluded by indexing configuration.

Common situations: The decorated interface lives in a dependency not indexed by Quarkus (missing Jandex index or not on the application archive); interface produced by annotation processing; index excludes filters dropping the package.

Related errors


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