quarkusio/quarkus · error · IllegalStateException
Synthetic bean does not provide a creation method, use Exten
Error message
Synthetic bean does not provide a creation method, use ExtendedBeanConfigurator#creator(), ExtendedBeanConfigurator#supplier(), ExtendedBeanConfigurator#createWith() or ExtendedBeanConfigurator#runtimeValue()
What it means
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.
Source
Thrown at extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/SyntheticBeanBuildItem.java:148
private RuntimeValue<?> runtimeValue;
private Function<SyntheticCreationalContext<?>, ?> fun;
private boolean staticInit;
private Supplier<ActiveResult> checkActive;
ExtendedBeanConfigurator(DotName implClazz) {
super(implClazz);
this.staticInit = true;
}
/**
* Finish the configurator.
*
* @return a new build item
*/
public SyntheticBeanBuildItem done() {
if (supplier == null && runtimeValue == null && fun == null && runtimeProxy == null && creatorConsumer == null) {
throw new IllegalStateException(
"Synthetic bean does not provide a creation method, use ExtendedBeanConfigurator#creator(), ExtendedBeanConfigurator#supplier(), ExtendedBeanConfigurator#createWith() or ExtendedBeanConfigurator#runtimeValue()");
}
if (checkActive != null && supplier == null && runtimeValue == null && fun == null && runtimeProxy == null) {
// "check active" procedure is set via recorder proxy,
// creation function must also be set via recorder proxy
throw new IllegalStateException(
"Synthetic bean has ExtendedBeanConfigurator#checkActive(), but does not have ExtendedBeanConfigurator#supplier() / createWith() / runtimeValue() / runtimeProxy()");
}
return new SyntheticBeanBuildItem(this);
}
/**
* The contextual bean instance is supplied by a proxy returned from a recorder method.
* <p>
* Use {@link #createWith(Function)} if you want to leverage build-time parameters or synthetic injection points.
*
* @param supplier A supplier returned from a recorder method
* @return selfView on GitHub (pinned to e1c734241f)
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)
Example fix
// before
SyntheticBeanBuildItem.configure(MyService.class).types(MyService.class).scope(Singleton.class).done();
// after
SyntheticBeanBuildItem.configure(MyService.class).types(MyService.class).scope(Singleton.class)
.supplier(recorder.myServiceSupplier()).done(); Defensive patterns
Strategy: validation
Validate before calling
ExtendedBeanConfigurator cfg = SyntheticBeanBuildItem.configure(MyBean.class); // before done(), ensure exactly one creation method is set: // cfg.supplier(...) | cfg.creator(...) | cfg.createWith(...) | cfg.runtimeValue(...) | cfg.runtimeProxy(...)
Prevention
- 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
When it happens
Trigger: Calling SyntheticBeanBuildItem.configure(...)...done() in a build step without calling any of .creator(), .supplier(), .createWith(), .runtimeValue(), or .runtimeProxy() on the configurator.
Common situations: 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.
Related errors
- Synthetic bean has ExtendedBeanConfigurator#checkActive(), b
- It is not possible to specify multiple creation methods
- The object is not a proxy returned from a recorder method: <
- Invalid annotation target: <target>
- The @Blocking, @NonBlocking and @RunOnVirtualThread annotati
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/0968c3f001b6c2af.
Report an issue: GitHub.