8

Logging initialized using configuration in jar:file:/usr/local/hive/lib/hive-common-0.12.0.jar!/hive-log4j.properties

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-    1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hive/lib/slf4j-log4j12-1.6.1.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]

hive>

DhiwaTdG
  • 748
  • 1
  • 10
  • 26
Mohammed AbuAli
  • 83
  • 1
  • 1
  • 5

5 Answers5

9

you need to delete these jar files binding between Hadoop and Hive

  • rm lib/hive-jdbc-2.0.0-standalone.jar
  • rm lib/log4j-slf4j-impl-2.4.1.jar
Hamdi Charef
  • 639
  • 2
  • 12
  • 19
5

you have to delete /usr/local/hive/lib/slf4j-log4j12-1.6.1.jar because hive will automatically use slf4j-log4j jar file present in hadoop.

you can also refer here https://issues.apache.org/jira/browse/HIVE-6162

siddhartha jain
  • 1,006
  • 10
  • 16
1

Of the 2 SLF4J bindings being listed in the warning you'll need to exclude one of them from the classpath.

Even though this is a warning SLF4J will pick one logging framework/implementation and bind with it - binding is determined by the JVM and is mostly considered a random function.

Kishore
  • 5,761
  • 5
  • 28
  • 53
  • 1
    Thanks a lot Mr.kishore,I removed the older version inside my dir /usr/local/hive/lib and left the newest version which is located in hadoop dir and its working perfect but ,there is another slf4j file called slf4j-api-1.6.1.jar and in the hadoop dir it's slf4j-api-1.7.5.jar should i remove the older version while there is no warning or error message? – Mohammed AbuAli Nov 21 '14 at 08:45
0

You are getting such warning message because of conflicts sl4j.jar which is being used from HIVE and HADOOP path. In order to get rid of this thing just delete hive-jdbc-1.1.0-standalone.jar from /usr/local/hive/lib. Then you should good to go ... :)

AKs
  • 1,727
  • 14
  • 18
0

To resolve this add the following line of script to /usr/iop/4.1.0.0/hive/bin/hive.distro file on all hive nodes,

CLASSPATH=`echo $CLASSPATH| sed 's/\/usr\/local\/hadoop\/lib\/slf4j\-log4j12\-1\.7\.10\.jar//g'` 

The script should be inserted after the lines

if $cygwin; then
CLASSPATH=`cygpath -p -w "$CLASSPATH"`
CLASSPATH=${CLASSPATH};${AUX_CLASSPATH}
else
CLASSPATH=${CLASSPATH}:${AUX_CLASSPATH}
fi

The warnings will no longer appear.

http://www-01.ibm.com/support/docview.wss?uid=swg21971864

ketankk
  • 2,578
  • 1
  • 29
  • 27