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

Illegal Reflective Access Operation Warning #5864

Closed
keithrbennett opened this issue Sep 9, 2019 · 3 comments
Closed

Illegal Reflective Access Operation Warning #5864

keithrbennett opened this issue Sep 9, 2019 · 3 comments
Milestone

Comments

@keithrbennett
Copy link

@keithrbennett keithrbennett commented Sep 9, 2019

Environment

➜  ~   rvm current
jruby-9.2.8.0
➜  ~   jruby -v
jruby 9.2.8.0 (2.5.3) 2019-08-12 a1ac7ff OpenJDK 64-Bit Server VM 11.0.1+13 on 11.0.1+13 +jit [darwin-x86_64]
➜  ~   echo $JRUBY_OPTS

➜  ~   uname -a
Darwin MacBook-Pro-KB-13.local 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64

Erroneous Behavior

Whenever running any command that starts JRuby, the following warnings are output to the terminal:

➜  ~   jruby -e nil
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.headius.backport9.modules.Modules to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
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

I am aware that there are other similar issues (bug reports), but @headius requested that I file this issue separately.

@monkstone

This comment has been minimized.

Copy link
Contributor

@monkstone monkstone commented Sep 11, 2019

I see the same and more when I run JRubyArt sketches with jruby-9.2.8.0

Linux tux-PC-2163 5.0.0-27-generic #28~18.04.1-Ubuntu SMP Thu Aug 22 03:00:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
java 12 2019-03-19
Java(TM) SE Runtime Environment (build 12+33)
Java HotSpot(TM) 64-Bit Server VM (build 12+33, mixed mode, sharing)
@headius

This comment has been minimized.

Copy link
Member

@headius headius commented Sep 11, 2019

I think this is probably ok on master. Running JRuby on Java 11 I do not get these warnings.

Note that there's a bunch of work for JRuby 9.2.9 that does a better job of handling modules.

Here's my output for JRuby 9.2.8 and JRuby master on Java 11:

[] ~/projects/jruby $ rvm jruby-9.2.8.0 do ruby -e 'puts 1'
2019-09-11T18:35:46.550+07:00 [main] WARN FilenoUtil : Native subprocess control requires open access to sun.nio.ch
Pass '--add-opens java.base/sun.nio.ch=org.jruby.dist' or '=org.jruby.core' to enable.
1

[] ~/projects/jruby $ ruby -v -e 'puts 1'
jruby 9.2.9.0-SNAPSHOT (2.5.3) 2019-09-05 84a0700 OpenJDK 64-Bit Server VM 11.0.2+9 on 11.0.2+9 +jit [darwin-x86_64]
1

See also GH-5826 which will add support for aggregating these --add-opens flags in various .jruby.java_opts files.

@headius headius closed this Sep 11, 2019
@headius headius added this to the JRuby 9.2.9.0 milestone Sep 11, 2019
@headius

This comment has been minimized.

Copy link
Member

@headius headius commented Sep 11, 2019

Thanks for the report @keithrbennett! Looks like we might have addressed this since 9.2.8.

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.