Skip to content
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

4.0.2: Grails console startup fails with MissingMethodException, JMenu.setMnemonic #11510

Closed
longwa opened this issue Mar 27, 2020 · 3 comments
Closed
Assignees
Milestone

Comments

@longwa
Copy link
Contributor

longwa commented Mar 27, 2020

Starting with Grails 4.0.2, creating a new project and then running grails console results in a startup error:

2020-03-27 15:03:46.361 ERROR --- [  restartedMain] o.s.boot.SpringApplication               : Application run failed

groovy.lang.MissingMethodException: No signature of method: javax.swing.JMenu.setMnemonic() is applicable for argument types: (String) values: [F]
Possible solutions: setMnemonic(char), setMnemonic(int), getMnemonic()
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:70)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:76)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:76)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:156)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:176)
        at groovy.ui.view.MacOSXMenuBar$_run_closure1.doCall(MacOSXMenuBar.groovy:58)
        at groovy.ui.view.MacOSXMenuBar$_run_closure1.doCall(MacOSXMenuBar.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

Looks like it might be due to this issue:
https://issues.apache.org/jira/browse/GROOVY-8253

It does work in 4.0.1.

Running with OpenJDK 1.8.0_242, macOS.

@puneetbehl puneetbehl self-assigned this Mar 28, 2020
@puneetbehl puneetbehl added this to the grails-4.0.3 milestone Mar 28, 2020
@puneetbehl puneetbehl modified the milestones: grails-4.0.3, grails-4.0.4 Apr 3, 2020
@puneetbehl puneetbehl removed this from the grails-4.0.4 milestone Jun 10, 2020
@pinei
Copy link

pinei commented Aug 26, 2020

Same problem with grails-4.0.4.

The groovy issue wasn't resolved in 2017?

@puneetbehl puneetbehl added this to the grails-4.0.5 milestone Oct 19, 2020
@puneetbehl
Copy link
Contributor

Please update the Groovy version to 2.6.0-alpha-1 or higher.

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        if(details.requested.group == 'org.codehaus.groovy') {
            details.useVersion('2.6.0-alpha-4')
        }
    }
}

@puneetbehl puneetbehl modified the milestones: grails-4.0.5, grails-4.1.0 Oct 24, 2020
@puneetbehl
Copy link
Contributor

This issue is fixed with Grails 4.1.0.M2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants