It's because you're invoking a non-static function-
http://commons.apache.org/proper/commons-codec/apidocs/org/apache/commons/codec/net/URLCodec.html#decode(java.lang.String)

Dynamic invoker currently works only with static functions-
http://pig.apache.org/docs/r0.12.1/func.html#dynamic-invokers


On Thu, Apr 17, 2014 at 12:04 AM, hetal udani <[email protected]>wrote:

> Hi
> I am using pig-0.11 version in cloudera
> *This is the code i am using to decode content in file.
>
> DEFINE UriDecode 
> InvokeForString('org.apache.commons.codec.net.URLCodec.decode',
> 'String String');
> a= load '/user/olap/data/wiki_data/test_decode_file' as
> (encoded:chararray);
> b= foreach a generate UriDecode($0,'utf-8');
> store  b into '/user/olap/data/wiki_data/output_decode';
> *
>
> The error is am receiving is java.lang.NullPointerException
>
> Please let me know if i am doing something wrong.
>

Reply via email to