[ https://issues.apache.org/jira/browse/HIVE-9496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14304347#comment-14304347 ]
Alexander Pivovarov commented on HIVE-9496: ------------------------------------------- 1. I identified minimum list of jars needed to open jdbc connection and run simple queries {code} commons-logging-1.1.3.jar hive-exec-1.2.0-SNAPSHOT.jar hive-service-1.2.0-SNAPSHOT.jar httpcore-4.2.5.jar libthrift-0.9.2.jar hadoop-common-2.6.0.jar hive-jdbc-1.2.0-SNAPSHOT.jar httpclient-4.2.5.jar libfb303-0.9.2.jar slf4j-api-1.7.5.jar {code} It's only one jar from slf4j family - slf4j-api-1.7.5.jar. This jar does not have StaticLoggerBinder.class So, we can remove classes found in slf4j-log4j12-1.7.5.jar from hive-jdbc-standalone.jar and keep classes from slf4j-api-1.7.5.jar 2. hive-jdbc-standalone.jar is one of the 3 artifacts generated by hive package build. {code} apache-hive-1.2.0-SNAPSHOT-bin.tar.gz apache-hive-1.2.0-SNAPSHOT-jdbc.jar // this is another name for hive-jdbc-standalone.jar apache-hive-1.2.0-SNAPSHOT-src.tar.gz {code} So, probably we should not even include hive-jdbc-standalone.jar to apache-hive-1.2.0-bin.tar.gz. These 3 files (bin, src and jdbc) should be available for download on Hive Download website. (bin and src are already available) BUT, beeline which is included to apache-hive-1.2.0-bin.tar.gz is also jdbc client. It needs hive-jdbc-standalone.jar to open jdbc connection to Hiveserver2. beeline.sh location is bin/ext/beeline.sh so it has "ext" in path This is why beeline specific jars should also have "ext" in path This is why I put hive-jdbc-standalone.jar to extlib folder. We can use another folder for hive-jdbc-standalone.jar but it should not be mixed with hive/lib jars. Why have class duplicates in hive classpath and non-determenistic java classpath behaviours. Who knows from what jar particular class is loaded. The only purpose of having hive-jdbc-standalone.jar in apache-hive-1.2.0-bin.tar.gz is beeline requirements to have it in classpath. Lets put hive-jdbc-standalone.jar to beeline lib specific folder (or more generic jdbc-lib folder) All other client application (like SQuirrel SQL, SQL Workbench/J, Tableau, etc) should get apache-hive-1.2.0-SNAPSHOT-jdbc.jar from Hive Download website. > Slf4j warning in hive command > ----------------------------- > > Key: HIVE-9496 > URL: https://issues.apache.org/jira/browse/HIVE-9496 > Project: Hive > Issue Type: Bug > Components: CLI > Affects Versions: 0.14.0 > Environment: HDP 2.2.0 on CentOS. > With Horton Sand Box and my own cluster. > Reporter: Philippe Kernevez > Assignee: Alexander Pivovarov > Priority: Minor > Attachments: HIVE-9496.1.patch > > > Each time 'hive' command is ran, we have an Sl4J warning about multiple jars > containing SL4J classes. > This bug is similar to Hive-6162, but doesn't seems to be solved. > Logging initialized using configuration in > file:/etc/hive/conf/hive-log4j.properties > SLF4J: Class path contains multiple SLF4J bindings. > SLF4J: Found binding in > [jar:file:/usr/hdp/2.2.0.0-1084/hadoop/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] > SLF4J: Found binding in > [jar:file:/usr/hdp/2.2.0.0-1084/hive/lib/hive-jdbc-0.14.0.2.2.0.0-1084-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class] > SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an > explanation. > SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] -- This message was sent by Atlassian JIRA (v6.3.4#6332)