Qiheng He created HIVE-28429: -------------------------------- Summary: Running `TestHplsqlLocal ` unit tests under OpenJDK 22 will not find the `hadoop-client-api` class Key: HIVE-28429 URL: https://issues.apache.org/jira/browse/HIVE-28429 Project: Hive Issue Type: Bug Reporter: Qiheng He
- Running *TestHplsqlLocal* unit tests under OpenJDK 22 will not find the *org.apache.hadoop:hadoop-client-api* class. The simplest verification process may be as follows. {code:bash} sdk install java 8.0.422-tem sdk install java 22.0.2-graalce sdk install maven git clone g...@github.com:apache/hive.git cd ./hive/ git reset --hard 76a03b8173e36681d8824bd30920cadff0bfb4fa sdk use java 8.0.422-tem mvn clean install -DskipTests sdk use java 22.0.2-graalce mvn test -Dtest=TestHplsqlLocal {code} - The following Error Log will be thrown. {code:bash} ------------------------------------------------------------------------------- Test set: org.apache.hive.hplsql.TestHplsqlLocal ------------------------------------------------------------------------------- Tests run: 86, Failures: 0, Errors: 86, Skipped: 0, Time elapsed: 0.61 s <<< FAILURE! - in org.apache.hive.hplsql.TestHplsqlLocal org.apache.hive.hplsql.TestHplsqlLocal.testException Time elapsed: 0.429 s <<< ERROR! java.lang.NoClassDefFoundError: org/apache/hadoop/shaded/com/ctc/wstx/io/InputBootstrapper at org.apache.hive.hplsql.Exec.init(Exec.java:846) at org.apache.hive.hplsql.Exec.run(Exec.java:778) at org.apache.hive.hplsql.TestHplsqlLocal.run(TestHplsqlLocal.java:475) at org.apache.hive.hplsql.TestHplsqlLocal.testException(TestHplsqlLocal.java:229) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) {code} - This is a discovery from [https://github.com/apache/shardingsphere/pull/31526] . Using the HiveServer2 JDBC Driver on OpenJDK 22 always requires manually importing *org.apache.hadoop:hadoop-client-api:3.3.6* to add {*}org.apache.hadoop.shaded.com.ctc.wstx.io.InputBootstrapper{*}. Similar findings were found in [https://github.com/apache/spark/pull/30250] 4 years ago, although Spark did not use OpenJDK22 4 years ago. -- This message was sent by Atlassian Jira (v8.20.10#820010)