[ https://issues.apache.org/jira/browse/HBASE-28380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18009853#comment-18009853 ]
Nihal Jain commented on HBASE-28380: ------------------------------------ Hi the change HBASE-29225 handles most of this except for hbase-unsafe so i will change Jira title here > Build hbase-thirdparty with JDK17 > --------------------------------- > > Key: HBASE-28380 > URL: https://issues.apache.org/jira/browse/HBASE-28380 > Project: HBase > Issue Type: Improvement > Components: java, thirdparty > Reporter: Nihal Jain > Assignee: Nihal Jain > Priority: Major > > hbase-thirdparty fails to build with JDK 17. It fails for Unsafe module with > following: > {code:java} > [INFO] Apache HBase Third-Party Libs ...................... SUCCESS [ 5.138 > s] > [INFO] Apache HBase Patched and Relocated (Shaded) Protobuf SUCCESS [ 17.888 > s] > [INFO] Apache HBase Relocated (Shaded) Netty Libs ......... SUCCESS [02:19 > min] > [INFO] Apache HBase Relocated (Shaded) netty-tcnative Libs SUCCESS [ 46.429 > s] > [INFO] Apache HBase Relocated (Shaded) GSON Libs .......... SUCCESS [ 1.021 > s] > [INFO] Apache HBase Relocated (Shaded) Third-party Miscellaneous Libs SUCCESS > [ 8.435 s] > [INFO] Apache HBase Relocated (Shaded) Jetty Libs ......... SUCCESS [ 4.972 > s] > [INFO] Apache HBase Relocated (Shaded) Jersey Libs ........ SUCCESS [ 11.526 > s] > [INFO] Apache HBase Relocated (Shaded) jackson-jaxrs-json-provider SUCCESS [ > 1.421 s] > [INFO] Apache HBase Unsafe Wrapper ........................ FAILURE [ 0.331 > s] > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD FAILURE > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 03:57 min > [INFO] Finished at: 2024-02-16T07:20:20Z > [INFO] > ------------------------------------------------------------------------ > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile > (default-compile) on project hbase-unsafe: Compilation failure: Compilation > failure: > [ERROR] > /workspace/hbase/hbase-unsafe/src/main/java/org/apache/hadoop/hbase/unsafe/HBaseUnsafeInternal.java:[259,18] > cannot find symbol > [ERROR] symbol: method > defineClass(java.lang.String,byte[],int,int,java.lang.ClassLoader,java.security.ProtectionDomain) > [ERROR] location: variable UNSAFE of type sun.misc.Unsafe > [ERROR] > /workspace/hbase/hbase-unsafe/src/main/java/org/apache/hadoop/hbase/unsafe/HBaseUnsafeInternal.java:[263,18] > cannot find symbol > [ERROR] symbol: method defineAnonymousClass(java.lang.Class<capture#1 of > ?>,byte[],java.lang.Object[]) > [ERROR] location: variable UNSAFE of type sun.misc.Unsafe > [ERROR] -> [Help 1] > {code} > The code does not compile as there is a breaking change in JKD17 around > unsafe usage: > * [https://bugs.openjdk.org/browse/JDK-8266760] > * [https://bugs.openjdk.org/browse/JDK-8199699] > Need to raise a patch with changes for HBaseUnsafeInternal implementation > such that it is compatible (with JDK8) and still works for JDK11 and JDK17. -- This message was sent by Atlassian Jira (v8.20.10#820010)