Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha-1
    • Fix Version/s: 2.6.0-alpha-1
    • Component/s: Groovy Console
    • Labels:
      None

      Description

      The issue can be reproduced by executing me.sunlan.groovyconsole.GroovyConsole#main at https://github.com/danielsun1106/groovyconsole

      Fails to launch(groovy 3.0.0 snapshot)
      https://github.com/danielsun1106/groovyconsole/releases/tag/0.0.1

      Launch successfully(groovy 2.4.12)
      https://github.com/danielsun1106/groovyconsole/releases/tag/0.0.2

      Error messages:

      Exception in thread "main" 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:60)
      	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:66)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:81)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
      	at groovy.ui.view.BasicMenuBar$_run_closure1.doCall(BasicMenuBar.groovy:26)
      	at groovy.ui.view.BasicMenuBar$_run_closure1.doCall(BasicMenuBar.groovy)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:989)
      	at groovy.lang.Closure.call(Closure.java:415)
      	at groovy.lang.Closure.call(Closure.java:409)
      	at groovy.util.FactoryBuilderSupport.dispatchNodeCall(FactoryBuilderSupport.java:889)
      	at groovy.util.FactoryBuilderSupport.doInvokeMethod(FactoryBuilderSupport.java:781)
      	at groovy.util.FactoryBuilderSupport.invokeMethod(FactoryBuilderSupport.java:501)
      	at groovy.util.FactoryInterceptorMetaClass.invokeMethod(FactoryBuilderSupport.java:1312)
      	at groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:46)
      	at groovy.lang.Script.invokeMethod(Script.java:80)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:75)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
      	at groovy.ui.view.BasicMenuBar.run(BasicMenuBar.groovy:25)
      	at groovy.util.FactoryBuilderSupport.build(FactoryBuilderSupport.java:1171)
      	at groovy.util.FactoryBuilderSupport.build(FactoryBuilderSupport.java:1154)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
      	at groovy.ui.Console$__clinit__closure26.doCall(Console.groovy:337)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:989)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      	at groovy.ui.ConsoleView$_run_closure1.doCall(ConsoleView.groovy:59)
      	at groovy.ui.ConsoleView$_run_closure1.doCall(ConsoleView.groovy)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:989)
      	at groovy.lang.Closure.call(Closure.java:415)
      	at groovy.lang.Closure.call(Closure.java:409)
      	at groovy.util.FactoryBuilderSupport.dispatchNodeCall(FactoryBuilderSupport.java:889)
      	at groovy.util.FactoryBuilderSupport.doInvokeMethod(FactoryBuilderSupport.java:781)
      	at groovy.util.FactoryBuilderSupport.invokeMethod(FactoryBuilderSupport.java:501)
      	at groovy.util.FactoryInterceptorMetaClass.invokeMethod(FactoryBuilderSupport.java:1312)
      	at groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:46)
      	at groovy.lang.Script.invokeMethod(Script.java:80)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:75)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
      	at groovy.ui.ConsoleView.run(ConsoleView.groovy:56)
      	at groovy.util.FactoryBuilderSupport.build(FactoryBuilderSupport.java:1171)
      	at groovy.util.FactoryBuilderSupport.build(FactoryBuilderSupport.java:1154)
      	at groovy.util.FactoryBuilderSupport$build$4.call(Unknown Source)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      	at groovy.ui.Console.run(Console.groovy:378)
      	at groovy.ui.Console$run$0.callCurrent(Unknown Source)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
      	at groovy.ui.Console.run(Console.groovy:341)
      	at me.sunlan.groovyconsole.GroovyConsole.main(GroovyConsole.java:11)
      
      

        Activity

        Hide
        jwagenleitner John Wagenleitner added a comment -

        Looks like after commit 23e6093921e06 the extension modules are not being written in the groovy-all jar. The missing method should be added by the SwingGroovyMethods class.

        groovy-all-3.0.0-SNAPSHOT.jar:META-INF/services/ExtensionModule
        # This is a generated file, do not edit
        moduleName=groovy-all
        moduleVersion=3.0.0-SNAPSHOT
        extensionClasses=
        staticExtensionClasses=
        
        Show
        jwagenleitner John Wagenleitner added a comment - Looks like after commit 23e6093921e06 the extension modules are not being written in the groovy-all jar. The missing method should be added by the SwingGroovyMethods class. groovy-all-3.0.0-SNAPSHOT.jar:META-INF/services/ExtensionModule # This is a generated file, do not edit moduleName=groovy-all moduleVersion=3.0.0-SNAPSHOT extensionClasses= staticExtensionClasses=
        Show
        jwagenleitner John Wagenleitner added a comment - Should be fixed by https://github.com/apache/groovy/commit/35aba7c0cf710b1337935f266ac6e6e6bef82c92
        Hide
        daniel_sun Daniel Sun added a comment -

        The issue is fixed. Thank you, John

        Show
        daniel_sun Daniel Sun added a comment - The issue is fixed. Thank you, John

          People

          • Assignee:
            jwagenleitner John Wagenleitner
            Reporter:
            daniel_sun Daniel Sun
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development