quarkusio/quarkus · error · IllegalStateException

Unable to perform live reload scanning

Error message

Unable to perform live reload scanning

What it means

During hot-replacement scanning in dev/live-reload mode, hotReplacementContext.doScan(true) threw an exception; the recorder wraps it in IllegalStateException. This is a dev-mode-only failure indicating the live reload infrastructure itself broke.

Source

Thrown at extensions/amazon-lambda/common-runtime/src/main/java/io/quarkus/amazon/lambda/runtime/LambdaHotReplacementRecorder.java:39

            return false;
        HotReplacementContext hotReplacementContext = DevConsoleManager.getHotReplacementContext();
        if (hotReplacementContext == null)
            return false;

        if ((nextUpdate > System.currentTimeMillis() && !hotReplacementContext.isTest())) {
            if (hotReplacementContext.getDeploymentProblem() != null) {
                throw new Exception("Hot Replacement Deployment issue", hotReplacementContext.getDeploymentProblem());
            }
            return false;
        }
        synchronized (syncLock) {
            if (nextUpdate < System.currentTimeMillis() || hotReplacementContext.isTest()) {
                nextUpdate = System.currentTimeMillis() + HOT_REPLACEMENT_INTERVAL;
                try {
                    boolean restart = hotReplacementContext.doScan(true);
                    return restart;
                } catch (Exception e) {
                    throw new IllegalStateException("Unable to perform live reload scanning", e);
                }
            }
        }
        return false;
    }

    public void enable() {
        enabled = true;
    }
}

View on GitHub (pinned to e1c734241f)

Solutions

  1. Read the full stack trace (cause) to see the underlying scanning failure and fix it
  2. Restart the dev-mode process (Ctrl+C and mvn quarkus:dev) to rebuild a clean state
  3. Run mvn clean then restart dev mode to purge stale classes
  4. Avoid running IDE auto-build and Quarkus dev mode writing to the same directory; exclude target/ from container volume sync issues
Defensive patterns

Strategy: try-catch

Try / catch

try { boolean restart = lambdaHotReplacementRecorder.checkHotReplacement(); } catch (IllegalStateException e) { log.warn("Live reload failed; restarting dev mode", e); /* fall back to manual restart */ }

Prevention

When it happens

Trigger: checkHotReplacement() runs on a timer/invocation in dev mode; when nextUpdate has elapsed (or isTest()), doScan(true) throws any Exception.

Common situations: Compilation errors during incremental dev-mode rebuild; corrupted target/classes while the app was running; IDE and Maven writing to the same output dir simultaneously; file-watching issues in mounted volumes (containers/Windows).

Related errors


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