{"record":{"id":"b2085163d03db08e","repo":"quarkusio/quarkus","slug":"cannot-initialize-reloadable-file-manager","errorCode":null,"errorMessage":"Cannot initialize reloadable file manager","messagePattern":"Cannot initialize reloadable file manager","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/deployment/dev/filesystem/ReloadableFileManager.java","lineNumber":46,"sourceCode":" * @see io.quarkus.deployment.configuration.ClassLoadingConfig#reloadableArtifacts\n *      Quarkus Class Loading Reference\n */\npublic class ReloadableFileManager extends QuarkusFileManager {\n\n    private final StandardJavaFileManager reloadableFileManager;\n\n    public ReloadableFileManager(Supplier<StandardJavaFileManager> supplier, Context context) {\n        this(supplier.get(), supplier.get(), context);\n    }\n\n    protected ReloadableFileManager(StandardJavaFileManager fileManager,\n            StandardJavaFileManager reloadableFileManager, Context context) {\n        super(fileManager, context);\n        this.reloadableFileManager = reloadableFileManager;\n        try {\n            this.reloadableFileManager.setLocation(StandardLocation.CLASS_PATH, context.getReloadableClassPath());\n        } catch (IOException e) {\n            throw new RuntimeException(\"Cannot initialize reloadable file manager\", e);\n        }\n    }\n\n    @Override\n    public ClassLoader getClassLoader(Location location) {\n        if (this.reloadableFileManager == null) {\n            return super.getClassLoader(location);\n        }\n        final ClassLoader staticClassLoader = super.getClassLoader(location);\n        if (staticClassLoader == null) {\n            return this.reloadableFileManager.getClassLoader(location);\n        }\n        final ClassLoader reloadableClassLoader = this.reloadableFileManager.getClassLoader(location);\n        if (reloadableClassLoader == null) {\n            return staticClassLoader;\n        }\n        return new JoinClassLoader(staticClassLoader.getParent(), staticClassLoader, reloadableClassLoader);\n    }","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/deployment/dev/filesystem/ReloadableFileManager.java#L28-L64","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Stop dev mode and run ./mvnw clean to reset corrupted build output, then restart quarkus:dev","Verify the reloadable class path directory (target/classes) exists and is writable","Restart the IDE/terminal environment if stale file locks are suspected (esp. on Windows)","Update Quarkus if reproducible on every reload — known dev-mode file-manager issues have been fixed over time"],"exampleFix":"// terminal\n// before: stuck after partial reload failure\nmvn quarkus:dev\n// after\nmvn clean quarkus:dev","handlingStrategy":"try-catch","validationCode":"Path classes = Path.of(\"target\", \"classes\");\nif (!Files.isDirectory(classes)) {\n    Files.createDirectories(classes); // ensure reloadable class path exists before dev mode compiles\n}","typeGuard":null,"tryCatchPattern":"try {\n    startDevMode();\n} catch (RuntimeException e) {\n    if (e.getCause() instanceof IOException && e.getMessage().contains(\"Cannot initialize reloadable file manager\")) {\n        // recover: clean build output and restart\n    }\n    throw e;\n}","preventionTips":["Don't run 'mvn clean' or IDE rebuilds while quarkus:dev is running","Keep target/ out of AV and cloud-sync real-time scanning","Restart dev mode cleanly after a crash rather than resuming a corrupted state"],"tags":["compiler","dev-mode","live-reload"],"backgroundTag":"file-manager-init-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}