Uploaded image for project: 'Jalview'
  1. Jalview
  2. JAL-3783

Groovy console does not open when Jalview launched from shadowJar in Java 11 for recent versions of groovy

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.11.1.3, 2.11.1.4, 2.11.2.0
    • Fix Version/s: 2.11.3.0
    • Component/s: Dev and Dep, gui
    • Labels:
    • Environment:
      Linux, using the executable jar (shadowJar),
      Java 11 only (works with Java 8 release)

      Description

      This only seems to happen when using Java 11 version when running the executable jar. Tested in Linux only.

      When opening the Groovy Console in the normal way from the Tools menu, the following error is generated and the Groovy console error dialog box appears.

      WARNING: An illegal reflective access operation has occurred
      WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/home/bsoares/Work/git/develop/jalview/build/libs/jalview-all-2.11.1.3-j11.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
      WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
      WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
      WARNING: All illegal access operations will be denied in a future release
      ERROR - Groovy Shell Creation 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)


      This appears to be related to a known groovy bug, so it is likely the specific version of the groovy jars in j11lib are to blame. See
      https://issues.apache.org/jira/browse/GROOVY-8253
      which suggests groovy 2.6.0 or above are patched (j11lib has 2.5.7, whereas j8lib has 2.4.12).

      I don't know why it works okay when launched from getdown, or from separate jars. I suspect a class is defined more than once in the plethora of groovy-*-2.5.7.jar files, and the bad one is used in shadowJar, but the good one prevails in multiple jar scenario. ???

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              soares Ben Soares
              Reporter:
              soares Ben Soares
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: