{"record":{"id":"0968c3f001b6c2af","repo":"quarkusio/quarkus","slug":"synthetic-bean-does-not-provide-a-creation-method","errorCode":null,"errorMessage":"Synthetic bean does not provide a creation method, use ExtendedBeanConfigurator#creator(), ExtendedBeanConfigurator#supplier(), ExtendedBeanConfigurator#createWith() or ExtendedBeanConfigurator#runtimeValue()","messagePattern":"Synthetic bean does not provide a creation method, use ExtendedBeanConfigurator#creator\\(\\), ExtendedBeanConfigurator#supplier\\(\\), ExtendedBeanConfigurator#createWith\\(\\) or ExtendedBeanConfigurator#runtimeValue\\(\\)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/SyntheticBeanBuildItem.java","lineNumber":148,"sourceCode":"        private RuntimeValue<?> runtimeValue;\n        private Function<SyntheticCreationalContext<?>, ?> fun;\n        private boolean staticInit;\n\n        private Supplier<ActiveResult> checkActive;\n\n        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","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/SyntheticBeanBuildItem.java#L130-L166","documentation":"SyntheticBeanBuildItem.done() validates that a synthetic bean being registered has some way to create its instance. If none of creator, supplier, createWith (fun), runtimeValue, or runtimeProxy was configured, the bean could never be instantiated, so the build fails with this IllegalStateException.","triggerScenarios":"Calling SyntheticBeanBuildItem.configure(...)...done() in a build step without calling any of .creator(), .supplier(), .createWith(), .runtimeValue(), or .runtimeProxy() on the configurator.","commonSituations":"Extension authors copy-pasting a configurator template and deleting the creation call; refactoring that removed a recorder call; conditionally skipping creator setup while still finishing the bean.","solutions":["Set a creation method on the configurator: .supplier(MyRecorder::createBean) or .creator(ctx -> ...) etc.","If the bean is not needed, remove the whole SyntheticBeanBuildItem.production instead of finishing an empty configurator","Check that the code path building the configurator is not bypassed by an early return","Read the ArC synthetic beans guide to pick the right creation style (creator vs supplier vs runtimeValue)"],"exampleFix":"// before\nSyntheticBeanBuildItem.configure(MyService.class).types(MyService.class).scope(Singleton.class).done();\n// after\nSyntheticBeanBuildItem.configure(MyService.class).types(MyService.class).scope(Singleton.class)\n    .supplier(recorder.myServiceSupplier()).done();","handlingStrategy":"validation","validationCode":"ExtendedBeanConfigurator cfg = SyntheticBeanBuildItem.configure(MyBean.class);\n// before done(), ensure exactly one creation method is set:\n// cfg.supplier(...) | cfg.creator(...) | cfg.createWith(...) | cfg.runtimeValue(...) | cfg.runtimeProxy(...)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always chain a creation call in the same expression as configure(...)","Never build configurators conditionally without a default creation method","Follow the ArC synthetic beans guide templates"],"tags":["cdi","synthetic-bean","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-14T00:17:10.932Z"}