hive 外部库 NoClassDefFoundError
从官网下载最新外部库 jar 包;
scu-hive 更换为 scu-hive-cli-2.10.jar
使用 hive_open 函数报错:
Caused by: java.lang.NoClassDefFoundError: org/apache/hadoop/mapred/JobConf
at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:4064)
at org.apache.hadoop.hive.conf.HiveConf.(HiveConf.java:4022)
at com.scudata.lib.hive.HiveConfProxy.(HiveConfProxy.java:74)
at com.scudata.lib.hive.function.HiveDriverCli.init(HiveDriverCli.java:70)
at com.scudata.lib.hive.function.HiveDriverCli.(HiveDriverCli.java:23)
at com.scudata.lib.hive.function.HiveOpen.calculate(HiveOpen.java:76)
at com.scudata.expression.Expression.calculate(Unknown Source:160)
at com.scudata.cellset.datamodel.PgmNormalCell.calculate(Unknown Source:159)
at com.scudata.cellset.datamodel.PgmCellSet._$1(Unknown Source:1949)
… 4 more
在外部库目录 Hivecli 中查找 JobConf 就知道使用的哪个 jar, 找不到说明缺少 jar
正常会查找到,如图所示: