{"record":{"id":"80b55368e521e31b","repo":"gradle/gradle","slug":"could-not-find-getter-method-for-property-s-on","errorCode":null,"errorMessage":"Could not find getter method for property '%s' on class %s.","messagePattern":"Could not find getter method for property '(.+?)' on class (.+?)\\.","errorType":"exception","errorClass":"NoSuchPropertyException","httpStatus":null,"severity":"error","filePath":"platforms/core-configuration/model-reflect/src/main/java/org/gradle/internal/reflect/JavaPropertyReflectionUtil.java","lineNumber":54,"sourceCode":"\npublic class JavaPropertyReflectionUtil {\n\n    private static final ClassValue<Set<String>> PROPERTY_CACHE = new ClassValue<Set<String>>() {\n        @Override\n        protected Set<String> computeValue(Class<?> type) {\n            return ClassInspector.inspect(type).getPropertyNames();\n        }\n    };\n\n    /**\n     * Locates the property with the given name as a readable property. Searches only public properties.\n     *\n     * @throws NoSuchPropertyException when the given property does not exist.\n     */\n    public static <T, F> PropertyAccessor<T, F> readableProperty(Class<T> target, Class<F> returnType, String property) throws NoSuchPropertyException {\n        final Method getterMethod = findGetterMethod(target, property);\n        if (getterMethod == null) {\n            throw new NoSuchPropertyException(String.format(\"Could not find getter method for property '%s' on class %s.\", property, target.getSimpleName()));\n        }\n        return new GetterMethodBackedPropertyAccessor<T, F>(property, returnType, getterMethod);\n    }\n\n    /**\n     * Locates the property with the given name as a readable property. Searches only public properties.\n     *\n     * @throws NoSuchPropertyException when the given property does not exist.\n     */\n    public static <T, F> PropertyAccessor<T, F> readableProperty(T target, Class<F> returnType, String property) throws NoSuchPropertyException {\n        @SuppressWarnings(\"unchecked\")\n        Class<T> targetClass = (Class<T>) target.getClass();\n        return readableProperty(targetClass, returnType, property);\n    }\n\n    @Nullable\n    public static Method findGetterMethod(Class<?> target, String property) {\n        Method[] methods = target.getMethods();","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/gradle/gradle/blob/534f27719b66953f95cc907aae7f2c1b12f5482d/platforms/core-configuration/model-reflect/src/main/java/org/gradle/internal/reflect/JavaPropertyReflectionUtil.java#L36-L72","documentation":"Error \"Could not find getter method for property '%s' on class %s.\" thrown in gradle/gradle.","triggerScenarios":"Thrown at platforms/core-configuration/model-reflect/src/main/java/org/gradle/internal/reflect/JavaPropertyReflectionUtil.java:54 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["No getter method exists for the property on the class. Add a getter (getX/isX) for the property, or correct the property name."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"534f27719b66953f95cc907aae7f2c1b12f5482d","analyzedAt":"2026-08-22T08:09:12.375Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}