quarkusio/quarkus · error · IllegalArgumentException
The object is not a proxy returned from a recorder method: <
Error message
The object is not a proxy returned from a recorder method: <object.toString()>
What it means
Recorder methods return runtime proxy objects (ReturnedProxy) that stand in for runtime values produced at build time. checkReturnedProxy validates that the object passed to supplier/runtimeValue/createWith/runtimeProxy/checkActive is such a recorder proxy; if not, the value could never be resolved at runtime, so it throws this IllegalArgumentException.
Source
Thrown at extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/SyntheticBeanBuildItem.java:305
return runtimeProxy;
}
Supplier<ActiveResult> getCheckActive() {
return checkActive;
}
private void checkMultipleCreationMethods() {
if (runtimeProxy == null && runtimeValue == null && supplier == null && fun == null) {
return;
}
throw new IllegalStateException("It is not possible to specify multiple creation methods");
}
private void checkReturnedProxy(Object object) {
if (object instanceof ReturnedProxy) {
return;
}
throw new IllegalArgumentException(
"The object is not a proxy returned from a recorder method: " + object.toString());
}
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Ensure the argument is the direct return value of a @Recorder method called in the deployment code
- Check the recorder method is not final/private and its return type is recordable
- Do not instantiate the value yourself — move construction into the recorder method
- If a constant is needed, configure it via other means (e.g. a creator lambda) rather than passing the raw object
Example fix
// before .configure(Foo.class).runtimeValue(new Foo()); // after .configure(Foo.class).runtimeValue(recorder.createFoo()); // @Recorder method
Defensive patterns
Strategy: type-guard
Validate before calling
if (!(value instanceof ReturnedProxy)) {
throw new IllegalArgumentException("Pass the result of a @Recorder method, not " + value);
} Type guard
static boolean isRecorderProxy(Object o) {
return o instanceof io.quarkus.runtime.annotations.Recorder.ReturnedProxy
|| o.getClass().getName().contains("RecorderProxy");
} Prevention
- Always pass the direct return value of a @Recorder method invoked in the build step
- Never construct the object manually in deployment code
- Check the recorder method's return type is recordable
When it happens
Trigger: Passing a plain object, lambda, or a non-recorder return value to .supplier(obj), .runtimeValue(obj), .createWith(obj), .runtimeProxy(obj) or .checkActive(obj) instead of the result of a @Recorder method invoked in the build step (a non-recordable method, or a value computed in Java).
Common situations: Calling a recorder method that returns a concrete class not proxied by the recorder framework; accidentally new-ing the object in the build step; using a helper that unwraps the proxy.
Related errors
- Synthetic bean has ExtendedBeanConfigurator#checkActive(), b
- Synthetic bean does not provide a creation method, use Exten
- It is not possible to specify multiple creation methods
- 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/ed43ceeefab83936.
Report an issue: GitHub.