FAQ
Hi,

I got this error when I executed a hadoop with a my jar application.

$> hadoop jar test-hdeploy.jar Test
Exception in thread "main" java.lang.NoSuchMethodError:
org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
at
org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:133)
at
org.apache.hadoop.security.UnixUserGroupInformation.login(UnixUserGroupInformation.java:301)
at org.apache.hadoop.mapred.JobClient.getUGI(JobClient.java:679)
at
org.apache.hadoop.mapred.JobClient.createRPCProxy(JobClient.java:429)
at org.apache.hadoop.mapred.JobClient.init(JobClient.java:423)
at org.apache.hadoop.mapred.JobClient.(Job.java:50)
at org.apache.hadoop.mapreduce.Job.(EPComparatorJob.java:78)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
at
com.naver.shopping.feeder.hadoop.EPComparatorJob.main(EPComparatorJob.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)

a hadoop already has dependecies with slf libraries.
(slf4j-log4j12-1.4.3.jar, slf4j-api-1.4.3.jar)

so my jar file doesn't need to include it.

do you know how I can fix it?

--
Junyoung Kim (juneng603@gmail.com)

Search Discussions

  • Li ping at Jan 25, 2011 at 2:57 am
    It is a NoSuchMethodError error.
    Perhaps, the jar that you are using does not contain the method.
    Please double check it.
    On Tue, Jan 25, 2011 at 10:44 AM, Jun Young Kim wrote:

    Hi,

    I got this error when I executed a hadoop with a my jar application.

    $> hadoop jar test-hdeploy.jar Test
    Exception in thread "main" java.lang.NoSuchMethodError:
    org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
    at
    org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:133)
    at
    org.apache.hadoop.security.UnixUserGroupInformation.login(UnixUserGroupInformation.java:301)
    at org.apache.hadoop.mapred.JobClient.getUGI(JobClient.java:679)
    at org.apache.hadoop.mapred.JobClient.createRPCProxy(JobClient.java:429)
    at org.apache.hadoop.mapred.JobClient.init(JobClient.java:423)
    at org.apache.hadoop.mapred.JobClient.<init>(JobClient.java:410)
    at org.apache.hadoop.mapreduce.Job.<init>(Job.java:50)
    at org.apache.hadoop.mapreduce.Job.<init>(Job.java:54)
    at
    com.naver.shopping.feeder.hadoop.EPComparatorJob.run(EPComparatorJob.java:78)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
    at
    com.naver.shopping.feeder.hadoop.EPComparatorJob.main(EPComparatorJob.java:54)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:156)

    a hadoop already has dependecies with slf libraries.
    (slf4j-log4j12-1.4.3.jar, slf4j-api-1.4.3.jar)

    so my jar file doesn't need to include it.

    do you know how I can fix it?

    --
    Junyoung Kim (juneng603@gmail.com)

    --
    -----李平
  • Jun Young Kim at Jan 25, 2011 at 2:59 am
    I found the reasons.

    it's the reason that it is using old library.
    hadoop version of slf is 1.4.x.

    so, I've replaced it with the latest version of it. (1.6.1)

    now, there is no problems to execute it.

    thanks.

    Junyoung Kim (juneng603@gmail.com)

    On 01/25/2011 11:56 AM, li ping wrote:
    It is a NoSuchMethodError error.
    Perhaps, the jar that you are using does not contain the method.
    Please double check it.

    On Tue, Jan 25, 2011 at 10:44 AM, Jun Young Kimwrote:
    Hi,

    I got this error when I executed a hadoop with a my jar application.

    $> hadoop jar test-hdeploy.jar Test
    Exception in thread "main" java.lang.NoSuchMethodError:
    org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
    at
    org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:133)
    at
    org.apache.hadoop.security.UnixUserGroupInformation.login(UnixUserGroupInformation.java:301)
    at org.apache.hadoop.mapred.JobClient.getUGI(JobClient.java:679)
    at org.apache.hadoop.mapred.JobClient.createRPCProxy(JobClient.java:429)
    at org.apache.hadoop.mapred.JobClient.init(JobClient.java:423)
    at org.apache.hadoop.mapred.JobClient.<init>(JobClient.java:410)
    at org.apache.hadoop.mapreduce.Job.<init>(Job.java:50)
    at org.apache.hadoop.mapreduce.Job.<init>(Job.java:54)
    at
    com.naver.shopping.feeder.hadoop.EPComparatorJob.run(EPComparatorJob.java:78)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
    at
    com.naver.shopping.feeder.hadoop.EPComparatorJob.main(EPComparatorJob.java:54)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:156)

    a hadoop already has dependecies with slf libraries.
    (slf4j-log4j12-1.4.3.jar, slf4j-api-1.4.3.jar)

    so my jar file doesn't need to include it.

    do you know how I can fix it?

    --
    Junyoung Kim (juneng603@gmail.com)
  • Zhang Jianfeng at Jan 25, 2011 at 3:01 am
    Hi Kim,

    You can put the reference jars into the HDFS and set the hadoop
    environment: hdfs.classpath.folder to this path.

    Jianfeng
    On Tue, Jan 25, 2011 at 10:44 AM, Jun Young Kim wrote:

    Hi,

    I got this error when I executed a hadoop with a my jar application.

    $> hadoop jar test-hdeploy.jar Test
    Exception in thread "main" java.lang.NoSuchMethodError:
    org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
    at
    org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:133)
    at
    org.apache.hadoop.security.UnixUserGroupInformation.login(UnixUserGroupInformation.java:301)
    at org.apache.hadoop.mapred.JobClient.getUGI(JobClient.java:679)
    at org.apache.hadoop.mapred.JobClient.createRPCProxy(JobClient.java:429)
    at org.apache.hadoop.mapred.JobClient.init(JobClient.java:423)
    at org.apache.hadoop.mapred.JobClient.<init>(JobClient.java:410)
    at org.apache.hadoop.mapreduce.Job.<init>(Job.java:50)
    at org.apache.hadoop.mapreduce.Job.<init>(Job.java:54)
    at
    com.naver.shopping.feeder.hadoop.EPComparatorJob.run(EPComparatorJob.java:78)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
    at
    com.naver.shopping.feeder.hadoop.EPComparatorJob.main(EPComparatorJob.java:54)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:156)

    a hadoop already has dependecies with slf libraries.
    (slf4j-log4j12-1.4.3.jar, slf4j-api-1.4.3.jar)

    so my jar file doesn't need to include it.

    do you know how I can fix it?

    --
    Junyoung Kim (juneng603@gmail.com)

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-user @
categorieshadoop
postedJan 25, '11 at 2:45a
activeJan 25, '11 at 3:01a
posts4
users3
websitehadoop.apache.org...
irc#hadoop

People

Translate

site design / logo © 2022 Grokbase