oracle/graal · error · UnsupportedOperationException
Continuations must be run on the Java on Truffle JVM with th
Error message
Continuations must be run on the Java on Truffle JVM with the java.Continuum option set to true.
What it means
UnsupportedOperationException from ContinuationImpl.resume() when the VM lacks continuation support. Same precondition as Continuation.create but raised on the resume path of an already-obtained Continuation instance (e.g. one deserialized on, or transferred to, an unsupported JVM).
Source
Thrown at espresso/src/org.graalvm.continuations/src/org/graalvm/continuations/ContinuationImpl.java:351
* Runs the continuation until it either completes or calls {@link SuspendCapability#suspend()}.
* The difference between the two reasons for returning is visible in {@link #getState()}. A
* continuation may not be resumed if it's already {@link State#COMPLETED} or
* {@link State#FAILED}, nor if it is already {@link State#RUNNING}.
*
* <p>
* If an exception is thrown by the continuation and escapes the entry point, it will be wrapped
* in {@link ContinuationExecutionException}, then rethrown here. The continuation is then no
* longer usable and must be discarded.
*
* @throws IllegalContinuationStateException if the {@link #getState()} is not
* {@link State#SUSPENDED}.
* @throws IllegalMaterializedRecordException if the VM rejects the frames recorded in
* {@link #stackFrameHead}.
*/
@Override
public boolean resume() {
if (!isSupported()) {
throw new UnsupportedOperationException("Continuations must be run on the Java on Truffle JVM with the java.Continuum option set to true.");
}
// Are we in the special waiting-to-start state?
if (updateState(State.NEW, State.RUNNING)) {
// Enable the use of suspend capabilities.
setExclusiveOwner();
try {
return start0();
} finally {
clearExclusiveOwner();
}
} else if (updateState(State.SUSPENDED, State.RUNNING)) {
setExclusiveOwner();
try {
// We are ready to resume, make sure the VM has the most up-to-date frames
ensureDematerialized();
assert stackFrameHead == null;
return resume0();View on GitHub (pinned to a66e9ccd1d)
Solutions
- Check Continuation.isSupported() before calling resume(), not only before create().
- Ensure every JVM that touches continuations runs Java on Truffle with java.Continuum=true.
- Route continuation work to dedicated Truffle worker nodes if the fleet is heterogeneous.
- Fail fast at node startup if continuation support is required.
Example fix
// before
continuation.resume();
// after
if (!Continuation.isSupported()) {
throw new UnsupportedOperationException("This node cannot resume continuations; route to a Java-on-Truffle worker");
}
continuation.resume(); Defensive patterns
Strategy: validation
Validate before calling
if (!Continuation.isSupported()) {
throw new UnsupportedOperationException("cannot resume continuations on this JVM");
} Prevention
- Check isSupported() before every resume site, not only creation.
- Verify VM configuration on all nodes that touch continuations.
- Route continuation work to Truffle-configured workers in mixed fleets.
When it happens
Trigger: Calling resume() on a Continuation object while running on a non-Truffle JVM or a Truffle JVM without java.Continuum enabled; deserializing a continuation on a plain JVM and then resuming it.
Common situations: Serialized continuations moved between nodes where only some run Java on Truffle; mixed test environments where creation succeeded but resume happens in a different JVM configuration.
Related errors
- This VM does not support continuations.
- This VM does not support continuations.
- You can't resume an already executing continuation.
- This continuation has already completed successfully.
- This continuation has failed and must be discarded.
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/e0c824abc8f0389c.
Report an issue: GitHub.