Guillaume Grossetie created HIVE-27476:
------------------------------------------

             Summary: Shade okhttp dependency in the JDBC driver
                 Key: HIVE-27476
                 URL: https://issues.apache.org/jira/browse/HIVE-27476
             Project: Hive
          Issue Type: Improvement
          Components: JDBC
    Affects Versions: 4.0.0-alpha-2
            Reporter: Guillaume Grossetie


This dependency is coming from:

 
{noformat}
org.apache.hive:hive-common:jar:4.0.0-alpha-2
  org.apache.tez:tez-api:jar:0.10.2
    org.apache.hadoop:hadoop-hdfs-client:jar:3.3.1
      com.squareup.okhttp:okhttp:jar:2.7.5
{noformat}
Version 2.7.5 was released Feb 26, 2016. 

I've seen in the `pom.xml` that we are excluding/shading dependencies: 
[https://github.com/apache/hive/blob/e6c6029439f831545fe5fa267452b662c3a71403/jdbc/pom.xml#L138-L374]

 

Would it be possible to shade `com.squareup` to avoid classpath 
conflicts/issues.

For reference, here's the exception we get since we have okhttp 2.7.5 and 
okhttp 4.11 in the classpath:

 
{noformat}
Exception in thread "main" java.lang.NoSuchFieldError: Companion
    at okhttp3.internal.Util.<clinit>(Util.kt:71)
    at okhttp3.HttpUrl$Builder.parse$okhttp(HttpUrl.kt:1239)
    at okhttp3.HttpUrl$Companion.get(HttpUrl.kt:1634){noformat}
 

 

Thanks!

 



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

Reply via email to