oracle/graal · error · UnsupportedOperationException

This VM does not support continuations.

Error message

This VM does not support continuations.

What it means

UnsupportedOperationException from SuspendCapability.readObjectExternal: Continuation.isSupported() is false on the current VM. SuspendCapability is the handle through which guest code suspends, and its deserialization requires the VM-level continuation machinery; the library therefore rejects the read immediately rather than constructing a capability that would explode later at first use. It is the SuspendCapability counterpart of the guard in ContinuationImpl/IdentityHashCodes.

Source

Thrown at espresso/src/org.graalvm.continuations/src/org/graalvm/continuations/SuspendCapability.java:97

    static SuspendCapability create(ContinuationImpl continuation) {
        return new SuspendCapability(continuation);
    }

    private SuspendCapability(ContinuationImpl continuation) {
        this.continuation = continuation;
    }

    private SuspendCapability() {
    }

    @Override
    void writeObjectExternal(ObjectOutput out) throws IOException {
        out.writeObject(continuation);
    }

    static SuspendCapability readObjectExternal(ObjectInput in, Consumer<SuspendCapability> registerFreshObject) throws IOException, ClassNotFoundException {
        if (!Continuation.isSupported()) {
            throw new UnsupportedOperationException("This VM does not support continuations.");
        }
        SuspendCapability suspend = new SuspendCapability();
        registerFreshObject.accept(suspend);
        Object obj = in.readObject();
        if (obj instanceof ContinuationImpl) {
            suspend.continuation = (ContinuationImpl) obj;
            return suspend;
        }
        throw new FormatVersionException("Erroneous deserialization of SuspendCapability.\n" +
                        "read object was not a continuation:" + obj);
    }

    // endregion internals
}

View on GitHub (pinned to a66e9ccd1d)

Solutions

  1. Run the deserializing process on a GraalVM build with continuations enabled.
  2. Gate deserialization on Continuation.isSupported() and degrade gracefully (reject the request or rebuild state) when false.
  3. Verify startup flags and distribution (require GraalVM, not stock JDK) in deployment scripts and container images.
  4. Keep workloads that exchange continuation payloads pinned to continuation-capable runtimes end to end.

Example fix

// before
Object o = deserializeFromNetwork(bytes); // graph contains SuspendCapability

// after
if (!Continuation.isSupported()) {
    throw new IllegalStateException("This runtime cannot resume continuations; use a GraalVM build with continuations enabled");
}
Object o = deserializeFromNetwork(bytes);
Defensive patterns

Strategy: validation

Validate before calling

if (!Continuation.isSupported()) {
    throw new IllegalStateException("Cannot deserialize continuations on this VM; use GraalVM with continuations enabled");
}

Prevention

When it happens

Trigger: Deserializing a stream that contains a SuspendCapability (e.g. a suspended continuation's object graph) on a VM without continuation support; calling Continuation.deserialize on plain OpenJDK.

Common situations: Continuation payloads read by tooling or tests running under a vanilla JRE; deploying a continuation-based service onto a runtime image built without GraalVM continuation support.

Related errors


AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14). Data as JSON: /api/errors/9ad054d0d69a5863. Report an issue: GitHub.