[ https://issues.apache.org/jira/browse/HIVE-28418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17870339#comment-17870339 ]
Qiheng He commented on HIVE-28418: ---------------------------------- [~dengzh] Thanks for the clarification. In this case, the current issue can be closed, as the embedded HiveServer2 is no longer considered trivial to use. > 4.1.0-Snapshot's HiveServer2 JDBC Driver has multiple missing classes > --------------------------------------------------------------------- > > Key: HIVE-28418 > URL: https://issues.apache.org/jira/browse/HIVE-28418 > Project: Hive > Issue Type: Bug > Reporter: Qiheng He > Priority: Major > > * 4.1.0-Snapshot's HiveServer2 JDBC Driver has multiple missing classes. This > is a follow-up survey for HIVE-28295 and HIVE-28315 . > - I created the smallest unit test at > [https://github.com/linghengqian/hive-embedded-mode-test]. The following > command verification is executed under the Ubuntu 22.04.4 of the installation. > {code:bash} > sdk install java 8.0.422-tem > sdk use java 8.0.422-tem > sdk install maven > git clone g...@github.com:apache/hive.git > cd ./hive/ > git reset --hard 929305f077f5e40311939ce7256adb3b35d985b0 > mvn clean install -DskipTests -T1C > cd ../ > git clone g...@github.com:linghengqian/hive-embedded-mode-test.git > cd ./hive-embedded-mode-test/ > mkdir -p /tmp/hive > chmod -R 777 /tmp/hive > ./mvnw clean test > rm -rf /tmp/hive > {code} > - The error log is similar to the following. > {code:bash} > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.127 > s <<< FAILURE! -- in com.lingh.HiveTest > [ERROR] com.lingh.HiveTest.test -- Time elapsed: 0.112 s <<< ERROR! > java.lang.NoClassDefFoundError: org/apache/hadoop/mapred/JobConf > at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:6498) > at org.apache.hadoop.hive.conf.HiveConf.<init>(HiveConf.java:6456) > at > org.apache.hive.jdbc.EmbeddedCLIServicePortal.buildOverlayedConf(EmbeddedCLIServicePortal.java:46) > at > org.apache.hive.jdbc.EmbeddedCLIServicePortal.get(EmbeddedCLIServicePortal.java:36) > at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:356) > at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:285) > at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:94) > at > com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:121) > at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) > at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) > at > com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) > at > com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) > at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) > at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81) > at com.lingh.HiveTest.test(HiveTest.java:20) > at java.lang.reflect.Method.invoke(Method.java:498) > at java.util.ArrayList.forEach(ArrayList.java:1259) > at java.util.ArrayList.forEach(ArrayList.java:1259) > Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.mapred.JobConf > at java.net.URLClassLoader.findClass(URLClassLoader.java:387) > at java.lang.ClassLoader.loadClass(ClassLoader.java:418) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) > at java.lang.ClassLoader.loadClass(ClassLoader.java:351) > ... 18 more > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)