magarena icon indicating copy to clipboard operation
magarena copied to clipboard

Update Groovy when it is fixed (to remove "Illegal reflective access" warning)

Open allentiak opened this issue 7 years ago • 11 comments

A side discovery from #1367.

I get an "Illegal reflective access" Java warning on Debian "testing/unstable" (buster/sid) with OpenJDK 9 (b181-4).

Note that this was tested with a packaged beta version of OpenJDK 9 (see details below). This should be re-tested again once OpenJDK 9 final is packed for Debian testing.

-> % /usr/lib/jvm/java-9-openjdk-amd64/bin/java -jar ./Magarena.jar

Data folder : /home/allentiak/opt/Magarena-1.89/Magarena
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/home/allentiak/opt/Magarena-1.89/lib/groovy-all-2.4.12.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
Using random seed 4822673713284

-> % apt list --installed|grep openjdk-9                           
openjdk-9-demo/unstable,testing,now 9~b181-4 amd64 [installed]
openjdk-9-doc/unstable,unstable,testing,testing,now 9~b181-4 all [installed]
openjdk-9-jdk/unstable,testing,now 9~b181-4 amd64 [installed]
openjdk-9-jdk-headless/unstable,testing,now 9~b181-4 amd64 [installed,automatic]
openjdk-9-jre/unstable,testing,now 9~b181-4 amd64 [installed]
openjdk-9-jre-headless/unstable,testing,now 9~b181-4 amd64 [installed,automatic]

allentiak avatar Oct 08 '17 02:10 allentiak

Thanks for the report. Good to hear that sounds works though. There is not much we can do as it is due to the current release of groovy. Will rename this to remind us to upgrade the dependency when a fixed version of groovy is released.

melvinzhang avatar Oct 08 '17 03:10 melvinzhang

Groovy has been updated... Have you tried v 2.4.14?

allentiak avatar Mar 10 '18 03:03 allentiak

According to their bug tracker, this issue is currently still open, see https://issues.apache.org/jira/browse/GROOVY-8339

melvinzhang avatar Mar 11 '18 01:03 melvinzhang

Any updates on the fix for groovy?

Cobra16319 avatar Sep 09 '19 02:09 Cobra16319

The groovy jira page mentioned it is fixed in 3.0 beta 1. We'll update when 3.0 is released.

melvinzhang avatar Sep 09 '19 03:09 melvinzhang

I will check out the beta. Thanks so much.

Cobra16319 avatar Sep 10 '19 00:09 Cobra16319

@melvinzhang I've just noticed Groovy 3.x has been out for a few months already.

Maybe it's time to update?

https://github.com/apache/groovy/releases

allentiak avatar Apr 06 '20 01:04 allentiak

Sure, but I'm having some problems updating the build.xml, currently we are using groovy-all, but there isn't an appropriate jar file in https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/3.0.2/

melvinzhang avatar Apr 06 '20 03:04 melvinzhang

What repo:branch are you using for testing this?

allentiak avatar Apr 06 '20 16:04 allentiak

this repo, master branch

melvinzhang avatar Apr 06 '20 23:04 melvinzhang

currently we are using groovy-all, but there isn't an appropriate jar file in https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/3.0.2/

Hmmm...

Is this the only jar you tried? Have you tried with another one? Which one(s)?

Groovy 3.0.x provides many jars... Maybe the functionality you need from 2.4 in 3.0 simply got moved somewhere else... https://www.youtube.com/watch?v=oyLBGkS5ICk&t=1946 ;-)

allentiak avatar Apr 07 '20 02:04 allentiak