{"record":{"id":"81dd849045b84ce4","repo":"quarkusio/quarkus","slug":"unable-to-serialiaze-gradle-application-model","errorCode":null,"errorMessage":"Unable to serialiaze gradle application model","messagePattern":"Unable to serialiaze gradle application model","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"devtools/gradle/gradle-extension-plugin/src/main/java/io/quarkus/extension/gradle/QuarkusExtensionPlugin.java","lineNumber":120,"sourceCode":"                        deploymentClasspath.setTransitive(true);\n                        // Add project dependency on deployment module\n                        project.getDependencies().add(DEPLOYMENT_CLASSPATH_CONFIGURATION_NAME,\n                                project.getDependencies().project(\n                                        java.util.Map.of(\"path\", deploymentProject.getPath())));\n                    }\n                    task.setDeploymentModuleClasspath(deploymentClasspath);\n                });\n\n                deploymentProject.getTasks().withType(Test.class).configureEach(test -> {\n                    test.useJUnitPlatform();\n                    test.doFirst(task -> {\n                        final Map<String, Object> props = test.getSystemProperties();\n                        final ApplicationModel appModel = ToolingUtils.create(deploymentProject, LaunchMode.TEST);\n                        try {\n                            final Path serializedModel = ToolingUtils.serializeAppModel(appModel, task, true);\n                            props.put(BootstrapConstants.SERIALIZED_TEST_APP_MODEL, serializedModel.toString());\n                        } catch (IOException e) {\n                            throw new GradleException(\"Unable to serialiaze gradle application model\", e);\n                        }\n                    });\n                });\n                if (ApplicationDeploymentClasspathBuilder.isDisableComponentVariants(project)) {\n                    // This seems to override the deployment configuration that otherwise would be created\n                    // by the ApplicationDeploymentClasspathBuilder, which will not work\n                    // especially for the component variant-based approach.\n                    exportDeploymentClasspath(deploymentProject);\n                }\n            }\n        });\n    }\n\n    private void exportDeploymentClasspath(Project project) {\n        DeploymentClasspathBuilder deploymentClasspathBuilder = new DeploymentClasspathBuilder(project);\n        project.getConfigurations().getByName(JavaPlugin.COMPILE_CLASSPATH_CONFIGURATION_NAME).getIncoming()\n                .beforeResolve((dependencies) -> deploymentClasspathBuilder\n                        .exportDeploymentClasspath(JavaPlugin.IMPLEMENTATION_CONFIGURATION_NAME, LaunchMode.NORMAL));","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/gradle/gradle-extension-plugin/src/main/java/io/quarkus/extension/gradle/QuarkusExtensionPlugin.java#L102-L138","documentation":"Thrown by QuarkusExtensionPlugin.registerTasks when serializing the Gradle application model for a Quarkus test task fails with an IOException. The serialized model path is passed to test JVMs via the SERIALIZED_TEST_APP_MODEL system property so they can bootstrap the application; without it test tasks cannot start.","triggerScenarios":"ToolingUtils.serializeAppModel(appModel, task, true) throws IOException while writing the model file next to the task's temporary directory — e.g. the target file cannot be created because the build directory is missing, read-only, or the disk is full.","commonSituations":"CI environments with read-only or full workspace disks, builds where the project build directory was deleted/locked mid-configuration, or permission issues after running builds with different users.","solutions":["Run gradle clean (or delete the project's build directory) and rebuild to clear stale/locked output.","Check disk space and that the build directory is writable by the user running Gradle.","Invalidate Gradle caches / restart the daemon (./gradlew --stop) if a stale daemon holds file handles.","If caused by a tooling bug, capture the wrapped IOException (GradleException cause) and report with plugin version."],"exampleFix":"// before\n./gradlew quarkusTest\n// after: clean state and retry\n./gradlew --stop && ./gradlew clean quarkusTest","handlingStrategy":"validation","validationCode":"// before running Quarkus Gradle tests\ndef buildDir = project.buildDir\nif (!buildDir.canWrite()) throw new IllegalStateException(\"Build dir not writable: $buildDir\")\nif (buildDir.usableSpace < 100L * 1024 * 1024) throw new IllegalStateException('Less than 100MB free on build volume')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep the workspace disk above a reasonable free-space threshold in CI.","Run gradle clean when build directories were created by a different user.","Stop stale daemons (./gradlew --stop) after environment changes.","Do not mount the Gradle workspace read-only while running test tasks."],"tags":["gradle","serialization","ioexception","build"],"backgroundTag":"serialization-io-failure","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"}