quarkusio/quarkus · critical · RuntimeException

Unable to deserialize the dev mode context. Does the Quarkus

Error message

Unable to deserialize the dev mode context. Does the Quarkus plugin version match the version of Quarkus that is in use?

What it means

DevModeMain (the entry point launched by the Quarkus Maven/Gradle plugin for dev mode) deserializes a DevModeContext object that the build tool wrote to the DEV_MODE_CONTEXT classpath resource. If deserialization fails — most commonly because the serialized stream was written by an incompatible plugin version — this RuntimeException is thrown telling you the plugin and Quarkus versions likely don't match.

Source

Thrown at core/deployment/src/main/java/io/quarkus/deployment/dev/DevModeMain.java:62

    private volatile CuratedApplication curatedApplication;
    private Closeable realCloseable;

    public DevModeMain(DevModeContext context) {
        this(context, null);
    }

    public DevModeMain(DevModeContext context, ApplicationModel appModel) {
        this.context = context;
        this.appModel = appModel;
    }

    public static void main(String... args) throws Exception {
        try (InputStream devModeCp = DevModeMain.class.getClassLoader().getResourceAsStream(DEV_MODE_CONTEXT)) {
            DevModeContext context;
            try {
                context = (DevModeContext) new ObjectInputStream(new DataInputStream(devModeCp)).readObject();
            } catch (Exception e) {
                throw new RuntimeException(
                        "Unable to deserialize the dev mode context. Does the Quarkus plugin version match the version of Quarkus that is in use?",
                        e);
            }
            context.setArgs(args);
            DevModeMain devModeMain = new DevModeMain(context);
            devModeMain.start();
        }
    }

    public void start() throws Exception {
        //propagate system props
        propagateSystemProperties();
        prepareJVMSettings();

        try {
            QuarkusBootstrap.Builder bootstrapBuilder = QuarkusBootstrap.builder()
                    .setApplicationRoot(getApplicationBuildDirs())
                    .setExistingModel(appModel)

View on GitHub (pinned to e1c734241f)

Solutions

  1. Align the Quarkus Maven/Gradle plugin version with the Quarkus BOM/platform version in your build file.
  2. Run a clean build (mvn clean or gradle clean) to remove the stale serialized dev mode context.
  3. If using a locally built Quarkus, rebuild and install all modules (./mvnw install -Dquickly) so plugin and core match.
  4. Invalidate IDE caches / re-import the project to clear stale classpath entries.

Example fix

// before (pom.xml)
<quarkus.platform.version>3.14.0</quarkus.platform.version>
<!-- plugin pinned to 3.12.0 -->

// after
<quarkus.platform.version>3.14.0</quarkus.platform.version>
<!-- plugin managed by the same BOM: 3.14.0 -->
Defensive patterns

Strategy: fallback

Try / catch

try {
    // start dev mode
} catch (RuntimeException e) {
    if (e.getMessage() != null && e.getMessage().contains("Unable to deserialize the dev mode context")) {
        // stop, clean, align plugin/BOM versions, restart
    }
}

Prevention

When it happens

Trigger: Running quarkus:dev (or gradle quarkusDev) where the build plugin's DevModeContext serialization is incompatible with the Quarkus core version on the classpath; corrupted or stale dev-mode-context resource in the classpath.

Common situations: Mixing Quarkus versions (e.g. BOM updated but plugin not, or a locally built quarkus core with a released plugin); IDE-launched dev mode with stale build artifacts; upgrading Quarkus without rebuilding.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/6dbef13071a54cb0. Report an issue: GitHub.