{"record":{"id":"ae1b853f73577dcc","repo":"quarkusio/quarkus","slug":"e-getmessage","errorCode":null,"errorMessage":"e.getMessage()","messagePattern":"e\\.getMessage\\(\\)","errorType":"validation","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"devtools/gradle/gradle-extension-plugin/src/main/java/io/quarkus/extension/gradle/tasks/ExtensionDescriptorTask.java","lineNumber":357,"sourceCode":"            extObject = readExtensionFile(extensionFile.toPath(), mapper);\n        } else {\n            extObject = mapper.createObjectNode();\n        }\n\n        computeArtifactCoords(extObject);\n        computeProjectName(extObject);\n        computeSourceLocation(extObject);\n        computeQuarkusCoreVersion(extObject);\n        computeQuarkusExtensions(extObject);\n\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) {","sourceCodeStart":339,"sourceCodeEnd":375,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/gradle/gradle-extension-plugin/src/main/java/io/quarkus/extension/gradle/tasks/ExtensionDescriptorTask.java#L339-L375","documentation":"Thrown by ExtensionDescriptorTask.generateQuarkusExtensionDescriptor when ExtensionMetadataValidator.validate(extObject) raises an IOException. The rethrown GradleException propagates the validator's message and cause, so this fires when the generated extension descriptor object fails schema/content validation.","triggerScenarios":"The assembled extObject (built from project info, extension metadata, and dependency data) violates rules enforced by ExtensionMetadataValidator — e.g. missing required fields like name/description/metadata entries or malformed values.","commonSituations":"An extension project with missing/empty project description or incomplete quarkus-extension metadata, renamed properties after a Quarkus upgrade, or custom build logic producing an extObject missing required keys.","solutions":["Read the cause chain of the GradleException for the validator's specific complaint and fix that field in the extension's build.gradle or metadata files.","Ensure required descriptor fields (name, description, extension metadata keys) are present in the project configuration.","Compare against a known-good Quarkus extension's descriptor configuration and update to current plugin expectations after version upgrades."],"exampleFix":"// before\nquarkusExt { description = null }\n// after\nquarkusExt {\n  description = 'My Quarkus extension'\n}/","handlingStrategy":"validation","validationCode":"// pre-check required descriptor fields before running the task\nif (!project.description) throw new IllegalStateException(\"Project '${project.name}' has no description — required by ExtensionMetadataValidator\")\ndef ext = project.extensions.findByName('quarkusExt')\nassert ext?.name : 'quarkusExt.name must be set'","typeGuard":null,"tryCatchPattern":"try {\n  extensionDescriptorTask.generateQuarkusExtensionDescriptor()\n} catch (GradleException e) {\n  logger.error(\"Descriptor validation failed: ${e.cause?.message}\")\n  throw e // fix the field named by the cause, then rerun\n}","preventionTips":["Always set project description, name, and metadata fields in extension build scripts.","After upgrading the Quarkus Gradle plugin, review validator changes for new required fields.","Compare your extension's descriptor config against a current reference extension.","Run validateExtension/extensionDescriptor locally before CI."],"tags":["gradle","validation","descriptor","extension-metadata"],"backgroundTag":"schema-validation-failed","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"}