Skip to content

Conversation

@matthurne
Copy link
Contributor

This is a proposed fix for Fix for GRAILS-10291 "Method name must not be null" exception when using custom onUnauthorized method in grails-shiro plugin's ShiroSecurityFilters which calls filter.forward rather than filter.redirect"

AbstractGrailsControllerHelper#handleURI needs to avoid getting the controller cached in the request to handle the forward. This couldn't be accomplished by looking for the presence of the existing "org.codehaus.groovy.grails.FORWARD_CALLED" attribute added to the request by ForwardMethod, because it is added after the call to AbstractGrailsControllerHelper#handleURI. Modifying ForwardMethod to add that attribute sooner causes other problems, such as CompositeInterceptor killing processing of the request prematurely. So the approach of this fix is for ForwardMethod to add a new attribute "org.codehaus.groovy.grails.FORWARD_IN_PROGRESS" to the request that AbstractGrailsControllerHelper#handleURI sees as an indication that it should not use the controller cached in the request.

…ing custom onUnauthorized method in grails-shiro plugin's ShiroSecurityFilters which calls filter.forward rather than filter.redirect"
graemerocher added a commit that referenced this pull request Jul 28, 2013
Fix for GRAILS-10291 "Method name must not be null" exception when using...
@graemerocher graemerocher merged commit bc64c4c into apache:2.2.x Jul 28, 2013
@matthurne matthurne deleted the 2.2.x branch July 29, 2013 12:42
jdaugherty pushed a commit to jdaugherty/grails-core that referenced this pull request Jan 15, 2025
Use correct task to find publish staging repo.

Fixes apache#382
jdaugherty pushed a commit to jdaugherty/grails-core that referenced this pull request Jun 28, 2025
* ci: Use Java 11 in 6.2.x branch

If native image is built with Java 17, application created with it will not be compatible with Java 11.

Error: LinkageError occurred while loading main class g621app.Application java.lang.UnsupportedClassVersionError: g621app/Application has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

* ci: graalvm +version -distribution

Test tip from graalvm/setup-graalvm#105 (comment)

* ci: Disable OSX Arm Native CLI

Graalvm cannot build Java 11 OSX Arm Native Image

Error: Failed to download graalvm-ce-java11-darwin-aarch64-22.3.3. Are you sure version: '22.3.3' and java-version: '11' are correct?
jdaugherty pushed a commit to jdaugherty/grails-core that referenced this pull request Jun 28, 2025
* Add grails-app/conf/spring/resources.groovy as a default feature (apache#366)

* Add grails-app/conf/spring/resources.groovy as a default feature to align with pre Grails 6 versions

* Set "executable" flag on grailsw

* Update to grails wrapper 4.0.1 - includes update-wrapper command for Grails 6 (apache#375)

* prep for grails 6.2.1 release (apache#376)

* [skip ci] Release v6.2.1

* chore: Bump version to 6.2.2-SNAPSHOT

* update grails-core to 6.2.2-SNAPSHOT (apache#379)

* update grails-core 6.2.2-SNAPSHOT

* Use Java 11 in 6.2.x branch (apache#382)

* ci: Use Java 11 in 6.2.x branch

If native image is built with Java 17, application created with it will not be compatible with Java 11.

Error: LinkageError occurred while loading main class g621app.Application java.lang.UnsupportedClassVersionError: g621app/Application has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

* ci: graalvm +version -distribution

Test tip from graalvm/setup-graalvm#105 (comment)

* ci: Disable OSX Arm Native CLI

Graalvm cannot build Java 11 OSX Arm Native Image

Error: Failed to download graalvm-ce-java11-darwin-aarch64-22.3.3. Are you sure version: '22.3.3' and java-version: '11' are correct?

* Include Geb/Selenium dependencies for MacOS Arch64 (apache#385)

* fix: Enable inclusion of Geb/Selenium deps for Macos Arch64

This was already enabled in another part of the code in
ad660a5

It looks like this was missed.

* test: Temporarily disable integrationTest task in create-app specs

Due to an issue with the integrationTest task during the create-app tests, the task is being temporarily disabled. The tests fail with `org.openqa.selenium.SessionNotCreatedException`, which seems to be related to the inclusion of Geb/Selenium dependencies for `OperatingSystem.MACOS_ARCH64`.

The apps in the create-app tests are created with `OperatingSystem.MACOS_ARCH64` as the operating system parameter, but will fail also for other operating systems.

This issue was likely masked before commit 8675723e62df6d136d7af48d5c75d7728cbef871, when the Geb/Selenium dependencies were not included for MACOS_ARCH64. With the dependencies now included, the integrationTest task fails.

---------

Co-authored-by: Scott Murphy <scott@alwaysvip.com>
Co-authored-by: grails-build <grails-build@users.noreply.github.com>
Co-authored-by: Mattias Reichel <mattias.reichel@gmail.com>
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

Successfully merging this pull request may close these issues.

2 participants