2013年8月10日星期六
hadoop log logback related issue
I mapreduce using logback logging, using java-jar Logback.jar com.zivon.test.LogBackTest command is executed , passed , but in the use hadoop jar Logback.jar com.zivon.test.LogBackTest jar package when running in LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory () when an error is thrown java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerFactory ; cannot be cast to ch.qos.logback.classic.LoggerContext
of you Daniel, what is the problem ah ?
------ Solution -------------------------- ------------------
encountered a similar problem a long time ago
This should be JAVA and HADOOP CLASSPATH environment caused by the difference
Judging from the error log
hadoop runtime environment error when the org.slf4j.impl.Log4jLoggerFactory library converted into LoggerContext CLASS
you carefully compare the -CLASSPATH java-jar and hadoop jar of -CLASSPATH
library references must have their differences
The easiest way to manually put the JAR package COPY ch.qos.logback.classic.LoggerContext to HADOOP_HOME / LIB / down
or run hadoop jar enforce the JAR corresponding directory
订阅:
博文评论 (Atom)
没有评论:
发表评论