{"record":{"id":"2b10df90a312ccd5","repo":"quarkusio/quarkus","slug":"synthetic-bean-has-extendedbeanconfigurator-checka","errorCode":null,"errorMessage":"Synthetic bean has ExtendedBeanConfigurator#checkActive(), but does not have ExtendedBeanConfigurator#supplier() / createWith() / runtimeValue() / runtimeProxy()","messagePattern":"Synthetic bean has ExtendedBeanConfigurator#checkActive\\(\\), but does not have ExtendedBeanConfigurator#supplier\\(\\) / createWith\\(\\) / runtimeValue\\(\\) / runtimeProxy\\(\\)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/SyntheticBeanBuildItem.java","lineNumber":154,"sourceCode":"        ExtendedBeanConfigurator(DotName implClazz) {\n            super(implClazz);\n            this.staticInit = true;\n        }\n\n        /**\n         * Finish the configurator.\n         *\n         * @return a new build item\n         */\n        public SyntheticBeanBuildItem done() {\n            if (supplier == null && runtimeValue == null && fun == null && runtimeProxy == null && creatorConsumer == null) {\n                throw new IllegalStateException(\n                        \"Synthetic bean does not provide a creation method, use ExtendedBeanConfigurator#creator(), ExtendedBeanConfigurator#supplier(), ExtendedBeanConfigurator#createWith() or ExtendedBeanConfigurator#runtimeValue()\");\n            }\n            if (checkActive != null && supplier == null && runtimeValue == null && fun == null && runtimeProxy == null) {\n                // \"check active\" procedure is set via recorder proxy,\n                // creation function must also be set via recorder proxy\n                throw new IllegalStateException(\n                        \"Synthetic bean has ExtendedBeanConfigurator#checkActive(), but does not have ExtendedBeanConfigurator#supplier() / createWith() / runtimeValue() / runtimeProxy()\");\n            }\n            return new SyntheticBeanBuildItem(this);\n        }\n\n        /**\n         * The contextual bean instance is supplied by a proxy returned from a recorder method.\n         * <p>\n         * Use {@link #createWith(Function)} if you want to leverage build-time parameters or synthetic injection points.\n         *\n         * @param supplier A supplier returned from a recorder method\n         * @return self\n         * @throws IllegalArgumentException If the supplier argument is not a proxy returned from a recorder method\n         */\n        public ExtendedBeanConfigurator supplier(Supplier<?> supplier) {\n            checkReturnedProxy(supplier);\n            checkMultipleCreationMethods();\n            this.supplier = Objects.requireNonNull(supplier);","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/SyntheticBeanBuildItem.java#L136-L172","documentation":"When ExtendedBeanConfigurator#checkActive() is set, done() requires that the bean's creation also be configured through a recorder proxy (supplier/createWith/runtimeValue/runtimeProxy). checkActive alone cannot produce an instance, so done() throws this IllegalStateException to enforce a consistent configuration.","triggerScenarios":"Calling .checkActive(recorder.someCheck()) on SyntheticBeanBuildItem.configure(...) but then relying on creator()/fun (non-proxy creation) or omitting creation entirely, then calling done().","commonSituations":"Extension authors adding an active-check to an existing synthetic bean whose creation is via a plain creator lambda instead of a recorder proxy; partial migration of old bean registrations to the checkActive API.","solutions":["Replace .creator(...)/.createWith(lambda) with a recorder-proxy based creation: .supplier(recorder.xxx()) or .createWith(recorder.xxx()) or .runtimeValue(recorder.xxx())","Or remove checkActive() if it is not required","Keep both the checkActive proxy and creation proxy from the same recorder invocation pattern","See SyntheticBeanBuildItem javadoc: checkActive requires proxy-based creation"],"exampleFix":"// before\nconfigure(Foo.class).scope(Singleton.class).creator(ctx -> new Foo()).checkActive(recorder.isActive()).done();\n// after\nconfigure(Foo.class).scope(Singleton.class).supplier(recorder.fooSupplier()).checkActive(recorder.isActive()).done();","handlingStrategy":"validation","validationCode":"// If using .checkActive(recorder.check()), creation must also be a recorder proxy:\n// .supplier(recorder.create()) — not .creator(ctx -> ...) and not omitted","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pair checkActive() only with supplier/createWith/runtimeValue/runtimeProxy","Migrate creator lambdas to recorder suppliers when adding checkActive","Review SyntheticBeanBuildItem javadoc before use"],"tags":["cdi","synthetic-bean","recorder","build-time","extension-development"],"backgroundTag":"synthetic-bean-missing-creation-method","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"}