Google Certified Professional Data Engineer

Sign Up Free or Log In to participate!

Illegal Reflective Access Operation Error

If, like me, you get the following Java error when trying to run the quickstart shell script, it is because cloud shell uses Java 11 as the default JRE and hbase requires Java 8. 

WARNING: An illegal reflective access operation has occurred

WARNING: Illegal reflective access by (file:/home/andrew_southcombe/.m2/repository/org/jruby/jruby-complete/1.6.8/jruby-complete-1.6.8.jar) to method java.lang.Object.registerNatives()

 Follow the instructions here to change your JAVA_HOME env variable to point to Java 8 and you should be good!

dummy account

Thank you very much. It worked. For the cbt part, i get an error like ‘Getting list of instances: rpc error: code = PermissionDenied desc = Access denied. Missing IAM permission: bigtable.instances.list.’ could you please help

Gregory L Porter

2020-10-04 This fix worked for me. Thanks!

Jackson Matos

Thanks for the help!

William Heath

Really appreciate this answer, thank you!

2 Answers

worked for me, thanks!

the relevant bit from the linked page

first run:  echo ${JAVA_HOME}
this is probably talking about java 11

then run: export JAVA_HOME=$(update-alternatives –list java | tail -1 | sed -E ‘s//bin/java//’)
then run this again: echo ${JAVA_HOME}
and it should now say java 8

Andrius Marcinkevicius

worked for me, thanks. Note : use JAVA_HOME not JAVAHOME 😉

I reset the JAVAHOME to JAVA 8 but still I get error

WARNING: All illegal access operations will be denied in a future release

ArgumentError: wrong number of arguments (0 for 1)

method_added at file:/home/jack/.m2/repository/org/jruby/jruby-complete/1.6.8/jruby-complete-1.6.8.jar!/builtin/javasupport/core_ext/object.r


method_added at file:/home/jack/.m2/repository/org/jruby/jruby-complete/1.6.8/jruby-complete-1.6.8.jar!/builtin/javasupport/core_ext/object.r


Pattern at file:/home/jack/.m2/repository/org/jruby/jruby-complete/1.6.8/jruby-complete-1.6.8.jar!/builtin/java/java.util.regex.rb:2

(root) at file:/home/jack/.m2/repository/org/jruby/jruby-complete/1.6.8/jruby-complete-1.6.8.jar!/builtin/java/java.util.regex.rb:1

require at org/jruby/

(root) at file:/home/jack/.m2/repository/org/jruby/jruby-complete/1.6.8/jruby-complete-1.6.8.jar!/builtin/java/java.util.regex.rb:42

(root) at thirdparty/hirb.rb:39

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?