{"record":{"id":"a9d501f1ee4df2a3","repo":"quarkusio/quarkus","slug":"ioexception-wrapped","errorCode":null,"errorMessage":"IOException (wrapped)","messagePattern":"IOException \\(wrapped\\)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/deployment/dev/RuntimeUpdatesProcessor.java","lineNumber":444,"sourceCode":"                    compileOutput = QuarkusConsole.INSTANCE.registerStatusLine(QuarkusConsole.COMPILE_ERROR);\n                }\n            }\n        }\n        return compileOutput;\n    }\n\n    @Override\n    public void updateFile(String file, byte[] data) {\n        requireNonNull(data, \"data\");\n        Path resolve = resolveApplicationPath(file);\n        try {\n            if (!Files.exists(resolve.getParent())) {\n                Files.createDirectories(resolve.getParent());\n            }\n            validateExistingPathComponents(applicationRoot.toAbsolutePath().normalize(), resolve, file);\n            Files.write(resolve, data);\n        } catch (IOException e) {\n            throw new RuntimeException(e);\n        }\n    }\n\n    @Override\n    public void deleteFile(String file) {\n        Path resolve = resolveApplicationPath(file);\n        try {\n            Files.deleteIfExists(resolve);\n        } catch (IOException e) {\n            throw new RuntimeException(e);\n        }\n    }\n\n    private Path resolveApplicationPath(String file) {\n        file = normalizeFile(file);\n        Path normalizedRoot = applicationRoot.toAbsolutePath().normalize();\n        Path relativePath = Path.of(file);\n        Path resolved = normalizedRoot.resolve(relativePath).normalize();","sourceCodeStart":426,"sourceCodeEnd":462,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/deployment/dev/RuntimeUpdatesProcessor.java#L426-L462","documentation":"RuntimeUpdatesProcessor.updateFile writes file content received from a remote dev-mode client into the application root. Any IOException while creating parent directories or writing the file is wrapped in a RuntimeException and rethrown, aborting the file sync. This indicates the server-side filesystem rejected the write during remote development mode.","triggerScenarios":"Calling updateFile(file, data) via the remote-dev HTTP sync endpoint when Files.createDirectories(resolve.getParent()) or Files.write(resolve, data) throws IOException — e.g. read-only application root, disk full, or a path component being an existing non-directory file.","commonSituations":"Application root directory permissions changed after startup; a regular file exists where a directory is needed; disk quota exceeded on the remote dev server; container filesystem mounted read-only.","solutions":["Check that the application root and its parents are writable by the process user (ls -ld, chmod/chown).","Verify no regular file exists at the target path or one of its parent directories; remove/rename the conflicting entry.","Check disk space/quota with df on the server host.","Run the dev server in a writable container/volume, not a read-only mount."],"exampleFix":"// server side: ensure writable root\n// before: ./mvnw quarkus:dev -Dquarkus.launch.devmode=true (root read-only)\n// after: chmod u+w target/classes && ./mvnw quarkus:dev -Dquarkus.launch.devmode=true","handlingStrategy":"validation","validationCode":"Path root = Path.of(\".\").toAbsolutePath().normalize();\nPath target = root.resolve(relPath).normalize();\nif (!target.startsWith(root)) throw new IllegalArgumentException(\"path escapes root\");\nFiles.createDirectories(target.getParent());\nif (!Files.isWritable(target.getParent())) throw new IllegalStateException(\"parent not writable: \" + target.getParent());","typeGuard":null,"tryCatchPattern":"try {\n    runtimeUpdatesProcessor.updateFile(file, data);\n} catch (RuntimeException e) {\n    Throwable cause = e.getCause();\n    if (cause instanceof IOException io) {\n        log.warnf(\"File sync failed for %s: %s\", file, io.getMessage());\n        // inspect permissions/space and retry\n    } else throw e;\n}","preventionTips":["Keep the application root writable by the dev-server user","Never place regular files where directories are expected under the root","Monitor disk space on dev servers","Avoid read-only container mounts for dev mode"],"tags":["io","remote-dev","file-sync","filesystem"],"backgroundTag":"ioexception-wrapped","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}