Skip to content

Grails 7.0.0-M3: Ambiguous method overloading for method GrailsControllerUrlMappings#matchAll #14060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Taack opened this issue Mar 10, 2025 · 1 comment

Comments

@Taack
Copy link

Taack commented Mar 10, 2025

Expected Behavior

The test app should mostly work.

Actual Behaviour

When trying accessing our test app with Grails 7.0.0-M3, the following error occurs:

2025-03-10 04:42:34.211 ERROR --- [nio-9442-exec-7] t.support.TaackUiEnablerInterceptor      : Access Denied: login auth Ambiguous method overloading for method org.grails.web.mapping.mvc.GrailsControllerUrlMappings#matchAll.
Cannot resolve which method to invoke for [class java.lang.String, null, class java.lang.String] due to overlapping prototypes between:
        [class java.lang.String, class java.lang.String, class java.lang.String]
        [class java.lang.String, class org.springframework.http.HttpMethod, class java.lang.String], __grails.anonymous.user__, [controller:login, action:auth]

The error occurs either with bootRun or with the bootJar, jar.

Steps To Reproduce

The test case is available at https://github.com/Taack/infra/tree/g7M3.

To launch it, under the g7M3 branch:

cd taack-ui-test
./gradlew bootRun

Environment Information

OS: Arch...
JDK: Correto 17
Grails: 7.0.0-M3
Groovy: 4.0.25

Example Application

https://github.com/Taack/infra/tree/g7M3

Version

7.0.0-M3

@Taack Taack changed the title Ambiguous method overloading for method org.grails.web.mapping.mvc.GrailsControllerUrlMappings#matchAll Grails 7.0.0-M3: Ambiguous method overloading for method GrailsControllerUrlMappings#matchAll Mar 10, 2025
@Taack
Copy link
Author

Taack commented Mar 10, 2025

Digging into this issue, it is caused by grailsRequest.currentRequest.method being null in grails/plugin/springsecurity/ReflectionUtils.groovy.

It might be a Groovy bug (method is clearly a String), I will try using Groovy 4.0.26.

Regards

@jamesfredley jamesfredley added this to the grails:7.0.0-M4 milestone Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants