[ 
https://issues.apache.org/jira/browse/HIVE-26818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17813148#comment-17813148
 ] 

Stamatis Zampetakis commented on HIVE-26818:
--------------------------------------------

Worth mentioning that that the missing dependency problem can be observed in 
various ways. For instance running the TestBeeLineDriver in the qtest module 
throws a NoClassDefFoundError

{noformat}
mvn test -Dtest=TestBeeLineDriver -Dqfile=smb_mapjoin_1.q
[ERROR] org.apache.hadoop.hive.cli.TestBeeLineDriver  Time elapsed: 7.614 s  
<<< ERROR!
java.lang.NoClassDefFoundError: org/supercsv/encoder/CsvEncoder
        at org.apache.hive.beeline.BeeLine.<init>(BeeLine.java:186)
        at org.apache.hive.beeline.BeeLine.<init>(BeeLine.java:566)
        at 
org.apache.hive.beeline.QFileBeeLineClient.<init>(QFileBeeLineClient.java:72)
        at 
org.apache.hive.beeline.QFileBeeLineClient$QFileClientBuilder.getClient(QFileBeeLineClient.java:260)
        at 
org.apache.hadoop.hive.cli.control.CoreBeeLineDriver.runInfraScript(CoreBeeLineDriver.java:174)
        at 
org.apache.hadoop.hive.cli.control.CoreBeeLineDriver.beforeClassSpec(CoreBeeLineDriver.java:168)
        at 
org.apache.hadoop.hive.cli.control.CliAdapter$1$1.evaluate(CliAdapter.java:93)
        at org.junit.rules.RunRules.evaluate(RunRules.java:20)
        at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
        at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:377)
        at 
org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:138)
        at 
org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:465)
        at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:451)
Caused by: java.lang.ClassNotFoundException: org.supercsv.encoder.CsvEncoder
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        ... 18 more
{noformat}
 
The same NoClassDefFoundError appeared also in hive-unit module in HIVE-27489 
and an explicit dependency to supercsv was added to circumvent the issue for 
this particular module.
 

> Beeline module misses transitive dependencies due to shading
> ------------------------------------------------------------
>
>                 Key: HIVE-26818
>                 URL: https://issues.apache.org/jira/browse/HIVE-26818
>             Project: Hive
>          Issue Type: Bug
>          Components: Beeline
>            Reporter: Stamatis Zampetakis
>            Priority: Major
>
> Due to shading, the dependecy-reduced-pom.xml file is installed in the local 
> maven repository 
> (~/.m2/repository/org/apache/hive/hive-beeline/4.0.0-SNAPSHOT/) for beeline. 
> The latter indicates that the module doesn't have any transitive 
> dependencies. If we were publishing the shaded jar that would be true but we 
> publish the regular jar.
> At this point, modules which include hive-beeline as a maven dependency are 
> broken and problems such as HIVE-26812 may occur.
> I was under the impression that these also affects 4.0.0-alpha-2 release 
> (since it includes ) HIVE-25750) but strangely the published pom has all the 
> dependencies:
> https://repo1.maven.org/maven2/org/apache/hive/hive-beeline/4.0.0-alpha-2/hive-beeline-4.0.0-alpha-2.pom



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to