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



    • Type: Bug
    • Status: In Progress
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s:,,
    • Fix Version/s: 2.11.3, 2.12.0
    • Component/s: Dev and Dep, gui
    • Labels:
    • Environment:
      Linux, using the executable jar (shadowJar),
      Java 11 only (works with Java 8 release)


      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- 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
      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. ???


          Issue Links



              soares Ben Soares
              soares Ben Soares
              0 Vote for this issue
              2 Start watching this issue