quarkusio/quarkus · error · RuntimeException

Cannot initialize reloadable file manager

Error message

Cannot initialize reloadable file manager

What it means

The ReloadableFileManager constructor wraps an IOException from setting the CLASS_PATH location on the underlying StandardJavaFileManager to the reloadable class path used by Quarkus dev mode's compiler. It means the dev-mode Java compiler could not be configured to load hot-reloaded classes.

Source

Thrown at core/deployment/src/main/java/io/quarkus/deployment/dev/filesystem/ReloadableFileManager.java:46

 * @see io.quarkus.deployment.configuration.ClassLoadingConfig#reloadableArtifacts
 *      Quarkus Class Loading Reference
 */
public class ReloadableFileManager extends QuarkusFileManager {

    private final StandardJavaFileManager reloadableFileManager;

    public ReloadableFileManager(Supplier<StandardJavaFileManager> supplier, Context context) {
        this(supplier.get(), supplier.get(), context);
    }

    protected ReloadableFileManager(StandardJavaFileManager fileManager,
            StandardJavaFileManager reloadableFileManager, Context context) {
        super(fileManager, context);
        this.reloadableFileManager = reloadableFileManager;
        try {
            this.reloadableFileManager.setLocation(StandardLocation.CLASS_PATH, context.getReloadableClassPath());
        } catch (IOException e) {
            throw new RuntimeException("Cannot initialize reloadable file manager", e);
        }
    }

    @Override
    public ClassLoader getClassLoader(Location location) {
        if (this.reloadableFileManager == null) {
            return super.getClassLoader(location);
        }
        final ClassLoader staticClassLoader = super.getClassLoader(location);
        if (staticClassLoader == null) {
            return this.reloadableFileManager.getClassLoader(location);
        }
        final ClassLoader reloadableClassLoader = this.reloadableFileManager.getClassLoader(location);
        if (reloadableClassLoader == null) {
            return staticClassLoader;
        }
        return new JoinClassLoader(staticClassLoader.getParent(), staticClassLoader, reloadableClassLoader);
    }

View on GitHub (pinned to e1c734241f)

Solutions

  1. Stop dev mode and run ./mvnw clean to reset corrupted build output, then restart quarkus:dev
  2. Verify the reloadable class path directory (target/classes) exists and is writable
  3. Restart the IDE/terminal environment if stale file locks are suspected (esp. on Windows)
  4. Update Quarkus if reproducible on every reload — known dev-mode file-manager issues have been fixed over time

Example fix

// terminal
// before: stuck after partial reload failure
mvn quarkus:dev
// after
mvn clean quarkus:dev
Defensive patterns

Strategy: try-catch

Validate before calling

Path classes = Path.of("target", "classes");
if (!Files.isDirectory(classes)) {
    Files.createDirectories(classes); // ensure reloadable class path exists before dev mode compiles
}

Try / catch

try {
    startDevMode();
} catch (RuntimeException e) {
    if (e.getCause() instanceof IOException && e.getMessage().contains("Cannot initialize reloadable file manager")) {
        // recover: clean build output and restart
    }
    throw e;
}

Prevention

When it happens

Trigger: Constructing ReloadableFileManager during dev-mode compilation when fileManager.setLocation(StandardLocation.CLASS_PATH, context.getReloadableClassPath()) throws IOException, typically because the reloadable class path directory does not exist or is invalid.

Common situations: Corrupted or deleted target/classes during live reload; a previous crash left dev-mode state inconsistent; antivirus or another process locked/deleted the classes directory mid-reload.

Related errors


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