{"record":{"id":"b83f92a4a0e7d399","repo":"oracle/graal","slug":"unsupported-serialized-continuation-version-s-nc-b83f92","errorCode":null,"errorMessage":"Unsupported serialized continuation version: %s\\nCurrent supported version: %s","messagePattern":"Unsupported serialized continuation version: (.+?)\\\\nCurrent supported version: (.+?)","errorType":"exception","errorClass":"FormatVersionException","httpStatus":null,"severity":"error","filePath":"espresso/src/org.graalvm.continuations/src/org/graalvm/continuations/FrameRecordSerializer.java","lineNumber":72,"sourceCode":"    final ObjectOutput out;\n    final ObjectInput in;\n    ClassLoader loader;\n\n    protected FrameRecordSerializer(ObjectOutput out) {\n        this.out = out;\n        this.in = null;\n    }\n\n    protected FrameRecordSerializer(ObjectInput in) {\n        this.out = null;\n        this.in = in;\n    }\n\n    public static FrameRecordSerializer forOut(int version, ObjectOutput out) throws FormatVersionException {\n        if (version == FrameRecordSerializerV2.FORMAT_VERSION) {\n            return new FrameRecordSerializerV2(out);\n        }\n        throw new FormatVersionException(version, ContinuationImpl.FORMAT_VERSION);\n    }\n\n    public static FrameRecordSerializer forIn(int version, ObjectInput in) throws FormatVersionException {\n        if (version == FrameRecordSerializerV2.FORMAT_VERSION) {\n            return new FrameRecordSerializerV2(in);\n        }\n        throw new FormatVersionException(version, ContinuationImpl.FORMAT_VERSION);\n    }\n\n    public final FrameRecordSerializer withLoader(ClassLoader classLoader) {\n        this.loader = classLoader;\n        return this;\n    }\n\n    public abstract void writeRecord(ContinuationImpl.FrameRecord frameRecord) throws IOException;\n\n    public abstract ContinuationImpl.FrameRecord readRecord() throws IOException, ClassNotFoundException;\n}","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/espresso/src/org.graalvm.continuations/src/org/graalvm/continuations/FrameRecordSerializer.java#L54-L90","documentation":"Thrown as FormatVersionException by FrameRecordSerializer.forOut when the version passed to create a writer is not FrameRecordSerializerV2.FORMAT_VERSION. ContinuationImpl calls this on the write path with its own FORMAT_VERSION; the exception means the top-level continuation format version and the frame-record writer version have diverged — an internal/library-build inconsistency, since both constants ship in the same JAR.","triggerScenarios":"ContinuationImpl.writeExternalImpl handing its FORMAT_VERSION to forOut when the linked FrameRecordSerializerV2 no longer accepts it; in practice this happens only when continuation classes from different builds are mixed on the classpath or module path.","commonSituations":"A workspace or application that bundles one version of org.graalvm.continuations while the VM supplies another; partial upgrades of GraalVM components (e.g. upgrading espresso but not the continuations library); shaded/fat JARs embedding stale copies of the library.","solutions":["Align all copies of org.graalvm.continuations to one version: remove shaded duplicates and depend on the version shipped with your GraalVM.","Run dependencyInsight/classpath diagnostics (mvn dependency:tree, gradle dependencies) to find who pulls in the stale org.graalvm.continuations artifact.","After aligning, re-serialize continuations — payloads written by the mismatched build are also suspect.","If you build GraalVM from source, do a clean mx build of the espresso suite so ContinuationImpl and FrameRecordSerializerV2 come from the same tree."],"exampleFix":"// before\n// fat jar shades org.graalvm.continuations:1.0 while VM ships 24.x\n// -> forOut throws FormatVersionException at write time\n\n// after\n// exclude the shaded copy so only the VM-provided library is used\n// build.gradle:\ndependencies { implementation('com.example:fatlib:1.0') { exclude group: 'org.graalvm.continuations' } }","handlingStrategy":"validation","validationCode":"// fail fast at startup on library mismatch\nClass<?> a = Class.forName(\"org.graalvm.continuations.ContinuationImpl\");\nClass<?> b = Class.forName(\"org.graalvm.continuations.FrameRecordSerializerV2\");\nif (!a.getProtectionDomain().getCodeSource().equals(b.getProtectionDomain().getCodeSource())) {\n    throw new IllegalStateException(\"Mixed org.graalvm.continuations copies on classpath\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep exactly one copy of org.graalvm.continuations on the classpath/module path.","Exclude continuation classes when shading dependencies into fat JARs.","When building GraalVM from source, clean-build the whole espresso suite together."],"tags":["serialization","continuations","version-mismatch","classpath"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}