{"record":{"id":"9c4437133b1f259f","repo":"quarkusio/quarkus","slug":"unable-to-instantiate-invokerreceiver","errorCode":null,"errorMessage":"Unable to instantiate InvokerReceiver:","messagePattern":"Unable to instantiate InvokerReceiver:","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/signals/runtime/src/main/java/io/quarkus/signals/runtime/impl/ReceiverManager.java","lineNumber":71,"sourceCode":"    ReceiverManager(SignalsContext signalsContext,\n            ReceiverExecutor executor,\n            @All List<SignalMetadataEnricher> allEnrichers,\n            @All List<ReceiverInterceptor> allInterceptors,\n            BeanContainer beanContainer) {\n        this.executor = executor;\n        this.beanContainer = beanContainer;\n        this.enrichers = orderByIdentifier(allEnrichers, signalsContext.orderedEnricherIds());\n        this.interceptors = orderByIdentifier(allInterceptors, signalsContext.orderedInterceptorIds());\n        this.resolvedReceivers = new ConcurrentHashMap<>();\n        this.receivers = new ConcurrentHashMap<>();\n        List<String> invokerReceiversClasses = signalsContext.receiversClasses();\n        ClassLoader tccl = Thread.currentThread().getContextClassLoader();\n        for (String irc : invokerReceiversClasses) {\n            try {\n                Receiver<?, ?> r = (Receiver<?, ?>) tccl.loadClass(irc).getConstructor().newInstance();\n                receivers.put(irc, wrapReceiver(r));\n            } catch (Exception e) {\n                throw new IllegalStateException(\"Unable to instantiate InvokerReceiver:\" + irc);\n            }\n        }\n    }\n\n    @Override\n    public <T> Signal<T> create(Class<T> type, Annotation... qualifiers) {\n        return new SignalImpl<T>(type, Set.of(qualifiers), Map.of(), this);\n    }\n\n    @Override\n    public <T> Signal<T> create(TypeLiteral<T> type, Annotation... qualifiers) {\n        return new SignalImpl<T>(type.getType(), Set.of(qualifiers), Map.of(), this);\n    }\n\n    List<SignalMetadataEnricher> enrichers() {\n        return enrichers;\n    }\n","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/signals/runtime/src/main/java/io/quarkus/signals/runtime/impl/ReceiverManager.java#L53-L89","documentation":"ReceiverManager eagerly instantiates every class named in the configured invoker-receiver class list at startup by loading it through the thread-context class loader and calling its no-arg constructor. If any class is missing, not a Receiver, lacks a no-arg constructor, or its constructor throws, the manager aborts with this IllegalStateException naming the failing class.","triggerScenarios":"A class listed in invokerReceiversClasses cannot be loaded (typo, wrong package, not on TCCL) or cannot be instantiated (abstract, no public no-arg constructor, constructor throws).","commonSituations":"Typo or stale class name in quarkus.signals receiver configuration; custom Receiver written without a public no-arg constructor; receiver class moved/renamed after upgrade; class present only in a module not visible to the runtime TCCL.","solutions":["Fix the class name in the invoker-receivers configuration so it matches the fully-qualified class on the runtime classpath","Give the receiver class a public no-arg constructor (or fix any exception thrown in that constructor)","Verify the class implements io.quarkus.signals Receiver and is public non-abstract","Check the class is in the application archive/dependencies so the TCCL can load it"],"exampleFix":"// before\nclass MyReceiver implements Receiver<Object, Object> {\n    public MyReceiver(String cfg) { ... }\n}\n// after\nclass MyReceiver implements Receiver<Object, Object> {\n    public MyReceiver() { ... }\n}","handlingStrategy":"validation","validationCode":"Class<?> c = Thread.currentThread().getContextClassLoader().loadClass(fqcn);\nReceiver<?, ?> r = (Receiver<?, ?>) c.getDeclaredConstructor().newInstance(); // must be public, no-arg","typeGuard":"boolean isInstantiableReceiver(Class<?> c) {\n    return Receiver.class.isAssignableFrom(c)\n        && !c.isInterface() && !java.lang.reflect.Modifier.isAbstract(c.getModifiers())\n        && Arrays.stream(c.getConstructors()).anyMatch(k -> k.getParameterCount() == 0);\n}","tryCatchPattern":"try { receivers.put(fqcn, wrap((Receiver<?, ?>) tccl.loadClass(fqcn).getConstructor().newInstance())); }\ncatch (ReflectiveOperationException | ClassCastException e) {\n    throw new IllegalStateException(\"Receiver not instantiable: \" + fqcn, e);\n}","preventionTips":["Verify the configured class name equals the fully-qualified name of a public concrete class","Ensure receivers have public no-arg constructors with no throwing logic","Keep receiver classes in the application archive visible to the TCCL","Add a startup smoke test that instantiates each configured receiver"],"tags":["reflection","instantiation","classpath","signals"],"backgroundTag":"class-instantiation-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}