{"record":{"id":"0e4be289a7fbd93b","repo":"quarkusio/quarkus","slug":"didn-t-find-method","errorCode":null,"errorMessage":"Didn't find method ","messagePattern":"Didn't find method ","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"devtools/gradle/gradle-model/src/main/java/io/quarkus/gradle/extension/ConfigurationUtils.java","lineNumber":21,"sourceCode":"import java.lang.reflect.InvocationTargetException;\nimport java.lang.reflect.Method;\n\nimport org.gradle.api.GradleException;\nimport org.gradle.api.provider.ListProperty;\nimport org.gradle.api.provider.Property;\nimport org.jetbrains.annotations.NotNull;\n\n// This is necessary because in included builds the returned `Project` instance and\n// `QuarkusExtensionConfiguration` extension is provided by a different class loader\n// which prevents us from creating some interface or casting to it directly.\npublic class ConfigurationUtils {\n    private static Object callGetter(@NotNull Object extensionConfiguration, String getterName) {\n        final Method getterMethod;\n\n        try {\n            getterMethod = extensionConfiguration.getClass().getMethod(getterName);\n        } catch (NoSuchMethodException e) {\n            throw new GradleException(\n                    \"Didn't find method \" + getterName + \" on class \" + extensionConfiguration.getClass().getName(), e);\n        }\n\n        try {\n            return getterMethod.invoke(extensionConfiguration);\n        } catch (IllegalAccessException | InvocationTargetException e) {\n            throw new GradleException(\n                    \"Failed to call method \" + getterName + \" on class \" + extensionConfiguration.getClass().getName(), e);\n        }\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    public static Property<String> getDeploymentModule(@NotNull Object extensionConfiguration) {\n        return (Property<String>) callGetter(extensionConfiguration, \"getDeploymentModule\");\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    public static ListProperty<String> getConditionalDependencies(@NotNull Object extensionConfiguration) {","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/gradle/gradle-model/src/main/java/io/quarkus/gradle/extension/ConfigurationUtils.java#L3-L39","documentation":"ConfigurationUtils.callGetter reads Quarkus Gradle extension configuration reflectively by invoking a no-arg getter (e.g. getDeploymentModule) on the extension object. If the expected getter method does not exist on the configuration class, it throws a GradleException naming the method and class. This protects against Gradle API shape changes across versions.","triggerScenarios":"getDeploymentModule, getConditionalDependencies, getConditionalDevDependencies, or getDependencyConditions calls callGetter with a getterName that the runtime extension configuration class does not expose — typically when Gradle's extension object differs from what Quarkus expects.","commonSituations":"Applying a Quarkus Gradle plugin built for a different Gradle version than the one running; custom/subclassed extension configurations missing expected properties; mixing Quarkus plugin versions in a multi-project build.","solutions":["Align Gradle version with the one supported by the Quarkus plugin version (upgrade wrapper or downgrade Quarkus plugin)","Ensure all subprojects apply the same Quarkus Gradle plugin version","Remove custom wrappers/replacements of the quarkus extension configuration that omit the expected properties","Rebuild after a Gradle upgrade so stale plugin jars are replaced"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// check the extension exposes the expected getter before Quarkus reflects on it\ndef ext = project.extensions.findByName('quarkus')\ndef expected = ['getDeploymentModule','getConditionalDependencies','getConditionalDevDependencies','getDependencyConditions']\ndef missing = expected.findAll { m -> !ext?.metaClass?.respondsTo(ext, m) }\nif (missing) {\n    throw new GradleException(\"Quarkus extension object missing methods: ${missing} — plugin/Gradle version mismatch\")\n}","typeGuard":null,"tryCatchPattern":"try {\n    project.evaluate()\n} catch (GradleException e) {\n    if (e.message?.startsWith('Didn\\u0027t find method ')) {\n        logger.error(\"Quarkus plugin incompatible with this Gradle version: {}\", e.message)\n    }\n    throw e\n}","preventionTips":["Keep Quarkus Gradle plugin and Gradle wrapper versions to a documented compatible combination","Apply the same Quarkus plugin version in every subproject","Avoid custom extension wrappers that drop expected properties","Re-run builds cleanly after Gradle major upgrades"],"tags":["gradle","reflection","plugin-api-mismatch"],"backgroundTag":"reflective-method-not-found","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"}