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

Qiheng He commented on HIVE-28308:
----------------------------------

- [~dengzh] Hey, I'm aware that there exists an Uber Jar for 
{*}org.apache.hive:hive-jdbc:4.0.0{*} with a {*}classifier{*} of 
{*}standalone{*}, as documented in the HiveServer2 Clients guide under 
[https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-JDBC],
 where `hive-jdbc-*-standalone.jar` is mentioned. This Uber Jar is indeed 
well-suited to address the issue encountered by DBeaver as described in 
[https://github.com/dbeaver/dbeaver/issues/22777]. However, Uber Jars are 
typically not ideal for integration with projects that have extensive 
third-party dependencies. For instance, in the context of integration testing 
at the apache/shardingsphere side, if I employ the following Maven dependencies,
{code:xml}
<dependency>
    <groupId>org.apache.hive</groupId>
    <artifactId>hive-jdbc</artifactId>
    <classifier>standalone</classifier>
    <version>4.0.0</version>
</dependency>
<dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-common</artifactId>
    <version>3.3.6</version>
    <exclusions>
        <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-reload4j</artifactId>
        </exclusion>
    </exclusions>
</dependency>
{code}
- The shaded packages included in this Uber JAR conflict with 
{*}com.cedarsoftware:java-util:2.4.0{*} used by apache/shardingsphere, 
consequently hindering the unit tests from proceeding,
{code:bash}
java.lang.NoSuchMethodError: 'void 
com.cedarsoftware.util.CaseInsensitiveMap.<init>(java.util.Map, java.util.Map)'
        at 
org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData.<init>(ShardingSphereMetaData.java:64)
        at 
org.apache.shardingsphere.mode.metadata.MetaDataContextsFactory.create(MetaDataContextsFactory.java:106)
{code}
- From my perspective, the documentation's FAQ does not seem to address how to 
incorporate the HiveServer2 JDBC Driver into a Maven project without using the 
Uber JAR. Furthermore, the Uber JAR can complicate building GraalVM Native 
Images, necessitating additional GraalVM Reachability Metadata due to its 
inclusive nature.

> The module `org.apache.hive:hive-jdbc:4.0.0` unintuitively removed all 
> dependencies under the Compile Scope
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-28308
>                 URL: https://issues.apache.org/jira/browse/HIVE-28308
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Qiheng He
>            Priority: Major
>
> - The module *org.apache.hive:hive-jdbc:4.0.0* unintuitively removed all 
> dependencies under the Compile Scope.
>  - Comparing the dependencies listed at 
> [https://central.sonatype.com/artifact/org.apache.hive/hive-jdbc/4.0.0/dependencies]
>  with those at 
> [https://central.sonatype.com/artifact/org.apache.hive/hive-jdbc/3.1.3/dependencies]
>  , it becomes apparent that *org.apache.hive:hive-jdbc:4.0.0* includes only 
> test dependencies. This results in the need to manually add additional 
> dependencies when utilizing the HiveServer2 JDBC Driver.
>  - 
> {code:xml}
> <dependency>
>   <groupId>org.apache.hive</groupId>
>   <artifactId>hive-jdbc</artifactId>
>   <version>4.0.0</version>
> </dependency>
> <dependency>
>   <groupId>org.apache.hive</groupId>
>   <artifactId>hive-service</artifactId>
>   <version>4.0.0</version>
> <exclusions>
>   <exclusion>
>     <groupId>org.apache.logging.log4j</groupId>
>     <artifactId>log4j-slf4j-impl</artifactId>
>   </exclusion>
>   <exclusion>
>     <groupId>org.slf4j</groupId>
>     <artifactId>slf4j-reload4j</artifactId>
>   </exclusion>
>   <exclusion>
>     <groupId>org.apache.logging.log4j</groupId>
>     <artifactId>log4j-web</artifactId>
>   </exclusion>
>   <exclusion>
>     <groupId>org.apache.logging.log4j</groupId>
>     <artifactId>log4j-core</artifactId>
>   </exclusion>
>   <exclusion>
>     <groupId>org.apache.logging.log4j</groupId>
>     <artifactId>log4j-api</artifactId>
>   </exclusion>
>   <exclusion>
>     <groupId>org.apache.logging.log4j</groupId>
>     <artifactId>log4j-1.2-api</artifactId>
>   </exclusion>
>   </exclusions>
> </dependency>
> <dependency>
>   <groupId>org.apache.hadoop</groupId>
>   <artifactId>hadoop-client-runtime</artifactId>
>   <version>3.3.6</version>
> </dependency>
> {code}
>  - More early surveys come from 
> https://github.com/apache/shardingSphere/pull/31526 and 
> https://github.com/dbeaver/dbeaver/issues/22777 . I personally think this is 
> not a reasonable phenomenon.



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

Reply via email to