quarkusio/quarkus · error · IllegalArgumentException
The cause of an inactive result must also be inactive
Error message
The cause of an inactive result must also be inactive
What it means
ActiveResult models why a synthetic bean is currently inactive; an inactive result may optionally point to a cause, but that cause must itself be inactive (its value must be false). ActiveResult.inactive(reason, cause) throws IllegalArgumentException when a non-null cause reports value == true, preventing an internally inconsistent chain that would misrepresent activation state.
Source
Thrown at independent-projects/arc/runtime/src/main/java/io/quarkus/arc/ActiveResult.java:49
* @return the inactive result
*/
public static ActiveResult inactive(String reason) {
return new ActiveResult(false, Objects.requireNonNull(reason), null);
}
/**
* The synthetic bean is question is inactive for given {@code reason}.
* The given {@code cause} is an {@link ActiveResult} for an underlying bean
* that is inactive and causes this bean to also become inactive.
*
* @param reason the reason why the synthetic bean is inactive; must not be {@code null}
* @param cause the cause why the synthetic bean is inactive; may be {@code null},
* but when it is not, it must be inactive as well
* @return the inactive result with a cause
*/
public static ActiveResult inactive(String reason, ActiveResult cause) {
if (cause != null && cause.value) {
throw new IllegalArgumentException("The cause of an inactive result must also be inactive");
}
return new ActiveResult(false, Objects.requireNonNull(reason), cause);
}
private ActiveResult(boolean value, String inactiveReason, ActiveResult inactiveCause) {
this.value = value;
this.inactiveReason = inactiveReason;
this.inactiveCause = inactiveCause;
}
/**
* Returns whether the synthetic bean in question is active.
*
* @return whether the synthetic bean in question is active
*/
public boolean value() {
return value;
}View on GitHub (pinned to e1c734241f)
Solutions
- Pass null as the cause when there is no inactive reason to chain.
- Ensure the cause is created via ActiveResult.inactive(...) so it is guaranteed to be inactive.
- Log or inspect the cause result's value before passing it; only forward results known to represent inactivity.
- Check library versions — if you believe the cause is inactive but it reports active, verify the code that produced it.
Example fix
// before
ActiveResult result = ActiveResult.inactive("bean disabled", activeResult);
// after
ActiveResult result = ActiveResult.inactive("bean disabled",
ActiveResult.inactive("upstream dependency disabled", null)); Defensive patterns
Strategy: type-guard
Validate before calling
if (cause != null && cause.isActive()) {
cause = null; // or rebuild as inactive before calling ActiveResult.inactive(reason, cause)
} Type guard
static ActiveResult asInactiveCause(ActiveResult r) {
return (r != null && !r.isActive()) ? r : null;
} Try / catch
try {
return ActiveResult.inactive(reason, cause);
} catch (IllegalArgumentException e) {
return ActiveResult.inactive(reason, null);
} Prevention
- Only ever pass results produced by ActiveResult.inactive(...) as causes.
- Never cache and reuse ActiveResult instances whose active flag may change.
- Add an assertion in result-producing code that chained causes are inactive.
When it happens
Trigger: Programmatically building an inactive ActiveResult (typically in custom synthetic bean/invoker handling) and passing an ActiveResult that was constructed with value=true (an 'active' result) as the cause argument.
Common situations: Chaining results from multiple activation checks and passing the wrong variable; caching a shared ActiveResult whose flag flipped; hand-rolling an ActiveResult via the private constructor path or a public factory misuse.
Related errors
- Creation logic not implemented
- Quarkus does not support CDI Full @Specializes annotation; t
- IllegalStateException wrapping ClassNotFoundException for ge
- Unable to derive the logger name at ${injectionPoint}
- Improper integration of '${LogFilterFactory.class.getName()}
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/e841f66a0d307818.
Report an issue: GitHub.