[ 
https://issues.apache.org/jira/browse/HBASE-22172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16814914#comment-16814914
 ] 

Josh Elser commented on HBASE-22172:
------------------------------------

{quote}I see that error before the patch but not after. Could you please share 
the steps you followed? Was it just after the launch or while some operations 
on the shell?
{quote}

Just launching {{hbase shell}}
{code:java}
% ./bin/hbase shell
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in 
version 9.0 and will likely be removed in a future release.
unsupported Java version "11", defaulting to 1.7
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.util.io.FilenoUtil 
(file:/Users/jelser/projects/hbase-copy.git/hbase-assembly/target/hbase-3.0.0-SNAPSHOT/lib/ruby/jruby-complete-9.1.13.0.jar)
 to method sun.nio.ch.SelChImpl.getFD()
WARNING: Please consider reporting this to the maintainers of 
org.jruby.util.io.FilenoUtil
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
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in 
[jar:file:/usr/local/lib/hadoop-3.1.1/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in 
[jar:file:/Users/jelser/projects/hbase-copy.git/hbase-assembly/target/hbase-3.0.0-SNAPSHOT/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
HBase Shell
Use "help" to get list of supported commands.
Use "exit" to quit this interactive shell.
For Reference, please visit: http://hbase.apache.org/book.html#shell
Version 3.0.0-SNAPSHOT, rffede2edfa32e1f6364a13f9a0dd534ad5696a38, Wed Apr 10 
16:16:28 EDT 2019
Took 0.0038 seconds
hbase(main):001:0>{code}
{code:java}
% tail -n 24 bin/hbase-config.sh
EOF
exit 1
fi

JAVA=$JAVA_HOME/bin/java
version=$(JAVA -version 2>&1 | awk -F '"' '/version/ {print $2}')
if [[ "$version" > "11" ]]; then
# Uncomment the following line to enable warnings of further illegal reflective 
access operations
# HBASE_OPTS="$HBASE_OPTS --illegal-access=warn"

HBASE_OPTS="$HBASE_OPTS --add-opens java.base/java.nio=ALL-UNNAMED"
HBASE_OPTS="$HBASE_OPTS --add-opens 
java.security.jgss/sun.security.krb5=ALL-UNNAMED"
HBASE_OPTS="$HBASE_OPTS --add-opens java.base/sun.nio.ch=ALL-UNNAMED"
HBASE_OPTS="$HBASE_OPTS --add-opens java.base/sun.nio.cs=ALL-UNNAMED"
HBASE_OPTS="$HBASE_OPTS --add-opens java.base/java.lang=ALL-UNNAMED"
HBASE_OPTS="$HBASE_OPTS --add-opens java.base/java.lang.reflect=ALL-UNNAMED"
HBASE_OPTS="$HBASE_OPTS --add-opens java.base/java.util.regex=ALL-UNNAMED"
HBASE_OPTS="$HBASE_OPTS --add-opens java.base/java.util.zip=ALL-UNNAMED"
HBASE_OPTS="$HBASE_OPTS --add-opens java.base/java.util=ALL-UNNAMED"
HBASE_OPTS="$HBASE_OPTS --add-opens java.base/java.net=ALL-UNNAMED"
HBASE_OPTS="$HBASE_OPTS --add-opens java.base/java.io=ALL-UNNAMED"
HBASE_OPTS="$HBASE_OPTS --add-opens java.base/java.security=ALL-UNNAMED"
HBASE_OPTS="$HBASE_OPTS --add-opens java.base/javax.crypto=ALL-UNNAMED"
fi{code}
{code:java}
% $(/usr/libexec/java_home -v11)/bin/java -version
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode){code}

> Suppress Java 11 reflective access warnings
> -------------------------------------------
>
>                 Key: HBASE-22172
>                 URL: https://issues.apache.org/jira/browse/HBASE-22172
>             Project: HBase
>          Issue Type: Task
>            Reporter: Sakthi
>            Assignee: Sakthi
>            Priority: Major
>              Labels: jdk11
>         Attachments: hbase-22172.master.001.patch
>
>
> While running a Java 8 compiled hbase on Java 11 system, I found the 
> following warnings being thrown. I think we can add the "--add-opens" flag to 
> HBASE_OPTS (if the jdk version is 11) to suppress this warning.
> {code:java}
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by 
> org.apache.hadoop.hbase.util.UnsafeAvailChecker 
> (file:/Users/jatsakthi/test/HBASE_TEST_AREA/hbase-3.0.0-SNAPSHOT/lib/hbase-common-3.0.0-SNAPSHOT.jar)
>  to method java.nio.Bits.unaligned()
> WARNING: Please consider reporting this to the maintainers of 
> org.apache.hadoop.hbase.util.UnsafeAvailChecker
> 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
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to