{"record":{"id":"db1d2f9a888ee4c4","repo":"quarkusio/quarkus","slug":"failed-to-persist","errorCode":null,"errorMessage":"Failed to persist ","messagePattern":"Failed to persist ","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"devtools/gradle/gradle-extension-plugin/src/main/java/io/quarkus/extension/gradle/tasks/ExtensionDescriptorTask.java","lineNumber":367,"sourceCode":"\n        if (!extObject.has(\"description\") && projectInfo.containsKey(\"description\")) {\n            extObject.put(\"description\", projectInfo.get(\"description\"));\n        }\n\n        try {\n            ExtensionMetadataValidator.validate(extObject);\n        } catch (IOException e) {\n            throw new GradleException(e.getMessage(), e.getCause());\n        }\n\n        final DefaultPrettyPrinter prettyPrinter = new DefaultPrettyPrinter();\n        prettyPrinter.indentArraysWith(DefaultIndenter.SYSTEM_LINEFEED_INSTANCE);\n\n        try (BufferedWriter bw = Files\n                .newBufferedWriter(outputMetaInfDirectory.resolve(BootstrapConstants.QUARKUS_EXTENSION_FILE_NAME))) {\n            bw.write(getMapper().writer().with(prettyPrinter).writeValueAsString(extObject));\n        } catch (IOException e) {\n            throw new GradleException(\n                    \"Failed to persist \" + outputMetaInfDirectory.resolve(BootstrapConstants.QUARKUS_EXTENSION_FILE_NAME), e);\n        }\n\n        ObjectMapper jsonMapper = getJsonMapper();\n        try (BufferedWriter bw = Files\n                .newBufferedWriter(outputMetaInfDirectory.resolve(BootstrapConstants.QUARKUS_EXTENSION_JSON_FILE_NAME))) {\n            bw.write(jsonMapper.writer().with(prettyPrinter).writeValueAsString(extObject));\n        } catch (IOException e) {\n            throw new GradleException(\n                    \"Failed to persist \"\n                            + outputMetaInfDirectory.resolve(BootstrapConstants.QUARKUS_EXTENSION_JSON_FILE_NAME),\n                    e);\n        }\n    }\n\n    private void computeProjectName(ObjectNode extObject) {\n        if (!extObject.has(\"name\")) {\n            if (projectInfo.containsKey(\"name\")) {","sourceCodeStart":349,"sourceCodeEnd":385,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/gradle/gradle-extension-plugin/src/main/java/io/quarkus/extension/gradle/tasks/ExtensionDescriptorTask.java#L349-L385","documentation":"Thrown by ExtensionDescriptorTask.generateQuarkusExtensionDescriptor when writing the quarkus-extension.properties descriptor file (QUARKUS_EXTENSION_FILE_NAME) into the output META-INF directory fails with an IOException. The pretty-printed extObject is serialized with Jackson and written via BufferedWriter; any write failure is wrapped in this GradleException.","triggerScenarios":"Files.newBufferedWriter or bw.write(...) throws while creating/writing outputMetaInfDirectory/quarkus-extension.properties — output dir doesn't exist and cannot be created, is read-only, or the existing file is locked.","commonSituations":"Read-only CI output directories, full disks, two builds racing on the same output directory, or the output directory belonging to another user.","solutions":["Make sure outputMetaInfDirectory exists and is writable before running the task (gradle clean then rebuild, fix permissions).","Free disk space if the volume is full.","Ensure no parallel/concurrent Gradle invocation writes the same output directory.","Check for locks by IDEs/AV and exclude the build dir from them."],"exampleFix":"// before: dir never created\nextensionDescriptor { outputDirectory = file('build/missing/meta-inf') }\n// after: create it in a doFirst\n/tasks.named('extensionDescriptor') { doFirst { file('build/missing/meta-inf').mkdirs() } }/","handlingStrategy":"validation","validationCode":"def out = outputMetaInfDirectory\nif (!out.exists() && !out.mkdirs()) throw new IllegalStateException(\"Cannot create output dir: $out\")\nif (!out.canWrite()) throw new IllegalStateException(\"Output dir not writable: $out\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure the task's output directory is created and writable before running (or rely on task outputs declarations).","Never point descriptor output at read-only mounts.","Run one build at a time per project directory.","Monitor CI disk usage; fail fast on low space."],"tags":["gradle","ioexception","descriptor","filesystem"],"backgroundTag":"file-write-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"}