{"record":{"id":"10b2c691e28ddfa7","repo":"quarkusio/quarkus","slug":"both-extensionconfiguration-and-extensiondescripto","errorCode":null,"errorMessage":"both extensionConfiguration and extensionDescriptor are null","messagePattern":"both extensionConfiguration and extensionDescriptor are null","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"devtools/gradle/gradle-model/src/main/java/io/quarkus/gradle/tooling/dependency/DependencyUtils.java","lineNumber":222,"sourceCode":"            }\n        }\n\n        if (extensionProject != null) {\n            return getExtensionInfoOrNull(project, extensionProject);\n        }\n\n        return null;\n    }\n\n    private static ProjectExtensionDependency createExtensionDependency(\n            Project project,\n            ModuleVersionIdentifier extensionArtifactId,\n            Project extensionProject,\n            @Nullable Object extensionConfiguration,\n            @Nullable Properties extensionDescriptor,\n            boolean isIncludedBuild) {\n        if (extensionConfiguration == null && extensionDescriptor == null) {\n            throw new IllegalArgumentException(\"both extensionConfiguration and extensionDescriptor are null\");\n        }\n\n        Project deploymentProject = null;\n\n        if (extensionConfiguration != null) {\n            final String deploymentProjectPath = ConfigurationUtils.getDeploymentModule(extensionConfiguration).get();\n            deploymentProject = ToolingUtils.findLocalProject(extensionProject, deploymentProjectPath);\n            if (deploymentProject == null) {\n                throw new GradleException(\"Cannot find deployment project for extension \" + extensionArtifactId + \" at path \"\n                        + deploymentProjectPath);\n            }\n        } else if (extensionDescriptor.containsKey(BootstrapConstants.PROP_DEPLOYMENT_ARTIFACT)) {\n            final ArtifactCoords deploymentArtifact = ArtifactCoords\n                    .fromString(extensionDescriptor.getProperty(BootstrapConstants.PROP_DEPLOYMENT_ARTIFACT));\n            deploymentProject = ToolingUtils.findLocalProject(project, deploymentArtifact);\n\n            if (deploymentProject == null) {\n                throw new GradleException(\"Cannot find deployment project for extension \" + extensionArtifactId","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/gradle/gradle-model/src/main/java/io/quarkus/gradle/tooling/dependency/DependencyUtils.java#L204-L240","documentation":"createExtensionDependency builds an ExtensionDependency for a local Quarkus extension project from either the quarkusExt extension's configuration (QuarkusExtensionConfiguration) or the parsed quarkus-extension.properties descriptor. It requires at least one of them; if both are null there is no way to determine the deployment module or conditional dependencies, so an IllegalArgumentException is thrown. In practice callers only invoke it after finding one of the two, so this signals an internal inconsistency.","triggerScenarios":"getExtensionInfoOrNull detects an extension (descriptorPath found or extensionConfiguration found) but race/bug clears both inputs before createExtensionDependency — e.g. descriptorPath becomes null but the descriptor Properties passed is null while configuration is also absent.","commonSituations":"A project that looks like an extension (has quarkus-extension.properties in resources) but lacks the quarkus { } extension configuration, combined with a tooling bug or a misapplied evaluation order; snapshots where tooling and plugin disagree.","solutions":["Verify the project actually is a Quarkus extension: it should have either the quarkus extension config (quarkus { } block via the quarkus-gradle-plugin applied) or META-INF/quarkus-extension.properties","Ensure the io.quarkus.extension gradle plugin is applied to the extension project and that the quarkus { deploymentModule } value points to an existing project","Check the descriptor file is valid properties (not empty/corrupt) if you rely on descriptor-based detection","Update/align the Quarkus Gradle plugin versions across build and included builds","If it persists with a valid extension, report with the project's build.gradle and descriptor contents"],"exampleFix":"// before (resources contain quarkus-extension.properties but no quarkus ext config)\nplugins { id 'java' }\n// after\nplugins { id 'java'; id 'io.quarkus.extension' }\nquarkus { deploymentModule = project(':my-ext-deployment') }","handlingStrategy":"validation","validationCode":"Object cfg = extProject.getExtensions().findByName(\"quarkus\");\nPath desc = findDescriptor(extProject); // scan resource dirs\nif (cfg == null && desc == null) {\n    throw new IllegalStateException(\"Not a Quarkus extension project: \" + extProject.getPath());\n}","typeGuard":null,"tryCatchPattern":"try {\n    var dep = DependencyUtils.getProjectExtensionDependencyOrNull(project, path, buildPath);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"both extensionConfiguration and extensionDescriptor are null\")) {\n        // ensure the io.quarkus.extension plugin is applied before retrying\n    } else throw e;\n}","preventionTips":["Apply the io.quarkus.extension plugin to every local extension project","Keep quarkus-extension.properties valid and present in main resources","Evaluate extension projects before tooling reads their configurations","Align Quarkus plugin versions across the build and included builds"],"tags":["gradle","extension","illegal-argument","descriptor"],"backgroundTag":"quarkus-extension-detection","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"}