NihalJain commented on code in PR #142: URL: https://github.com/apache/hbase-thirdparty/pull/142#discussion_r2222256508
########## hbase-shaded-protobuf/pom.xml: ########## @@ -29,6 +29,13 @@ <artifactId>hbase-shaded-protobuf</artifactId> <name>Apache HBase Patched and Relocated (Shaded) Protobuf</name> <description>Pulls down protobuf, patches it, compiles, and then relocates/shades.</description> + <properties> + <!-- Override parent's JDK 17 settings to force JDK 8 for hbase-shaded-protobuf. Review Comment: Yes right it used `sun.misc`, here the error if we try to build with jdk17 but target set to 8 for hbase-shaded-protobuf ``` [INFO] ---------< org.apache.hbase.thirdparty:hbase-shaded-protobuf >---------- [INFO] Building Apache HBase Patched and Relocated (Shaded) Protobuf 4.1.12-SNAPSHOT [2/13] [INFO] from hbase-shaded-protobuf/pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- clean:3.3.1:clean (default-clean) @ hbase-shaded-protobuf --- [INFO] Deleting /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/target [INFO] Deleting /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java (includes = [**/**], excludes = []) [INFO] Deleting /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/resources (includes = [**/**], excludes = []) [INFO] [INFO] --- flatten:1.5.0:clean (flatten.clean) @ hbase-shaded-protobuf --- [INFO] Deleting /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/.flattened-pom.xml [INFO] [INFO] --- toolchains:3.2.0:toolchain (default) @ hbase-shaded-protobuf --- [INFO] Required toolchain: jdk [ version='17' ] [INFO] Found matching toolchain for type jdk: JDK[/Library/Java/JavaVirtualMachines/openjdk-17.jdk/Contents/Home] [INFO] [INFO] --- build-helper:3.4.0:regex-property (regex-property) @ hbase-shaded-protobuf --- [INFO] [INFO] --- enforcer:3.4.1:enforce (enforce-maven-version) @ hbase-shaded-protobuf --- [INFO] [INFO] --- enforcer:3.4.1:enforce (enforce-java-version) @ hbase-shaded-protobuf --- [INFO] [INFO] --- enforcer:3.4.1:enforce (min-maven-min-java-banned-xerces) @ hbase-shaded-protobuf --- [INFO] Rule 2: org.apache.maven.enforcer.rules.dependency.BannedDependencies passed [INFO] [INFO] --- clean:3.3.1:clean (pre-generate-sources) @ hbase-shaded-protobuf --- [INFO] [INFO] --- dependency:3.6.0:unpack (unpack) @ hbase-shaded-protobuf --- [INFO] Configured Artifact: com.google.protobuf:protobuf-java:sources:4.30.2:jar [INFO] Configured Artifact: com.google.protobuf:protobuf-java:4.30.2:jar [INFO] [INFO] --- patch:1.2:apply (patch) @ hbase-shaded-protobuf --- [INFO] Applying patch: HBASE-15789.patch [INFO] Applying patch: HBASE-17087.patch [INFO] Applying patch: HBASE-17239.patch [INFO] [INFO] --- remote-resources:3.1.0:process (process-resource-bundles) @ hbase-shaded-protobuf --- [INFO] Preparing remote bundle org.apache.apache.resources:apache-jar-resource-bundle:1.5 [INFO] Copying 3 resources from 1 bundle. [INFO] Copying appended resource: META-INF/LICENSE [INFO] Copying appended resource: META-INF/NOTICE [INFO] [INFO] --- resources:3.3.1:resources (default-resources) @ hbase-shaded-protobuf --- [INFO] Copying 12 resources from src/main/resources to target/classes [INFO] Copying 3 resources from target/maven-shared-archive-resources to target/classes [INFO] [INFO] --- flatten:1.5.0:flatten (flatten) @ hbase-shaded-protobuf --- [INFO] Generating flattened POM of project org.apache.hbase.thirdparty:hbase-shaded-protobuf:jar:4.1.12-SNAPSHOT... [INFO] [INFO] --- compiler:3.13.0:compile (default-compile) @ hbase-shaded-protobuf --- [INFO] Toolchain in maven-compiler-plugin: JDK[/Library/Java/JavaVirtualMachines/openjdk-17.jdk/Contents/Home] [INFO] Recompiling the module because of changed source code. [INFO] Compiling 206 source files with javac [forked debug release 8] to target/classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/MessageSchema.java:[93,31] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[21,31] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[266,17] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[458,12] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[460,27] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[589,30] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[729,36] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[854,36] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[267,12] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[271,52] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[273,31] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[274,32] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[274,53] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/MessageSchema.java:[400,18] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/MessageSchema.java:[1469,18] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/MessageSchema.java:[2093,18] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/MessageSchema.java:[3736,18] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/MessageSchema.java:[3768,18] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/MessageSchema.java:[3938,18] error: package sun.misc does not exist [INFO] 19 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for Apache HBase Third-Party Libs 4.1.12-SNAPSHOT: [INFO] [INFO] Apache HBase Third-Party Libs ...................... SUCCESS [ 2.783 s] [INFO] Apache HBase Patched and Relocated (Shaded) Protobuf FAILURE [ 7.424 s] [INFO] Apache HBase Relocated (Shaded) Netty Libs ......... SKIPPED [INFO] Apache HBase Relocated (Shaded) netty-tcnative Libs SKIPPED [INFO] Apache HBase Relocated (Shaded) GSON Libs .......... SKIPPED [INFO] Apache HBase Relocated (Shaded) Third-party Miscellaneous Libs SKIPPED [INFO] Apache HBase Relocated (Shaded) Jetty Libs ......... SKIPPED [INFO] Apache HBase Relocated (Shaded) Jetty 12+ Libs: Core SKIPPED [INFO] Apache HBase Relocated (Shaded) Jetty 12+ Libs: EE8 SKIPPED [INFO] Apache HBase Relocated (Shaded) Jersey Libs ........ SKIPPED [INFO] Apache HBase Relocated (Shaded) jackson-jaxrs-json-provider SKIPPED [INFO] Apache HBase Drop-in noop HTrace replacement ....... SKIPPED [INFO] Apache HBase Unsafe Wrapper ........................ SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 10.565 s [INFO] Finished at: 2025-07-22T17:06:54+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project hbase-shaded-protobuf: Compilation failure: Compilation failure: [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/MessageSchema.java:[93,31] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[21,31] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[266,17] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[458,12] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[460,27] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[589,30] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[729,36] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[854,36] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[267,12] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[271,52] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[273,31] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[274,32] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/UnsafeUtil.java:[274,53] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/MessageSchema.java:[400,18] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/MessageSchema.java:[1469,18] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/MessageSchema.java:[2093,18] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/MessageSchema.java:[3736,18] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/MessageSchema.java:[3768,18] error: package sun.misc does not exist [ERROR] /Users/nihjain/code/os/hbase-thirdparty/hbase-shaded-protobuf/src/main/java/com/google/protobuf/MessageSchema.java:[3938,18] error: package sun.misc does not exist [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <args> -rf :hbase-shaded-protobuf ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org