Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig, mail # user - Jackson problem in custom Pig Eval function


Copy link to this message
-
Jackson problem in custom Pig Eval function
James Newhaven 2012-05-18, 16:17
I am trying to use the Jackson JSON mapper in a custom Eval Pig function
like this:

mapper.writeValueAsString(cityChartData);

However, when I use my custom function in a pig script, pig errors out with
this:

java.lang.NoSuchMethodError:
org.codehaus.jackson.map.ObjectMapper.writeValueAsString(Ljava/lang/Object;)Ljava/lang/String;

I am using Pig 0.9.2 and looking at the source I can see it is being built
with Jackson 1.7.3, which definitely has this method. Can anyone suggest
what could be the problem?

Thanks,

James