Which hadoop version are you using?
On 1/13/12 1:59 PM, "vvkbtnkr" <vvkbt...@yahoo.com> wrote: > > I am running a hadoop jar and keep getting this error - > java.lang.NoSuchMethodError: > org.codehaus.jackson.JsonParser.getValueAsLong() > > > on digging deeper, this is what I can find:- my jar packages version 1.8.5 > of jackson-mapper-asl (Jackson json parser) and I can verify that by using > "mvn dependency:resolve". I see that the proper version is being packaged > into my jar. > > However, initially my jar was packaging version 1.0.1 of jackson-mapper-asl > in the jar, thats because my jar depends on hadoop core 1.0.0 and as can be > seen here > > /org/apache/hadoop/hadoop-core/1.0.0/hadoop-core-1.0.0.pom > > contains the following dependency section: > > <dependency> > <groupId>org.codehaus.jackson</groupId> > <artifactId>jackson-mapper-asl</artifactId> > <version>1.0.1</version> > </dependency> > > > That is hadoop core depends on version 1.0.1 ... > > > > Given this, my current guess is that, though my jar which i run as > > hadoop jar myjar.jar > > > contains the proper version of jackson parser, somehow during the call to > "hadoop jar" , the wrong version , 1.0.1, of the jar is being loaded by > hadoop. Does this make sense? I spent a lot of time verifying that the > created jar file "myjar.jar" does indeed have proper version of jackson > parser (i checked the size of JsonParser.class files in my jar is exactly > the same as version 1.8.5 of jackson-mapper-asl), so something seems to be > happening while hadoop is loading the classes, and am thinking it probably > loads version 1.0.1 first, as hadoop core depends on it. > > Any one faced similar issues, any idea where to look ...