You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Sean Timm <Ti...@aol.com> on 2011/09/07 23:07:13 UTC
dynamic invoker error Caused by: java.lang.NoClassDefFoundError:
com/google/common/collect/Sets
I'm using Pig 0.8.1.
I recieved an error trying to use a dynamic invoker with
URLDecoder.decode(String, String) caused by
java.lang.NoClassDefFoundError: com/google/common/collect/Sets which is
used by org.apache.builtin.Invoker and packaged in pig-0.8.1-core.jar.
To get around this issue I had to register the pig jar as in the example
below. This doesn't seem like it should be necessary, though I do see
one other reference to this in a prior e-mail thread between Dmitry
Ryaboy and Dan Brickley back in March
(http://mail-archives.apache.org/mod_mbox/pig-user/201103.mbox/%3CAANLkTingb3=5X3e9XzU=kwfXzm9JH833Cj5k2+MiBUOO@mail.gmail.com%3E).
Is this how it should work, or am I doing something wrong?
REGISTER $PIG_DIR/pig-0.8.1-core.jar
DEFINE UrlDecode InvokeForString('java.net.URLDecoder.decode', 'String
String');
data = LOAD file AS a:chararray;
foo = FOREACH data GENERATE UrlDecode(a, 'UTF-8') AS a;
Thanks,
Sean
Re: dynamic invoker error Caused by: java.lang.NullPointerException
Posted by Cheolsoo Park <pi...@gmail.com>.
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 <he...@intellicus.com>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.
>
dynamic invoker error Caused by: java.lang.NullPointerException
Posted by hetal udani <he...@intellicus.com>.
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.
Re: dynamic invoker error Caused by: java.lang.NoClassDefFoundError: com/google/common/collect/Sets
Posted by Dmitriy Ryaboy <dv...@gmail.com>.
I snuck it in under some HBaseStorage thing :)
On Wed, Sep 7, 2011 at 6:13 PM, Sean Timm <Ti...@aol.com> wrote:
> Thanks! I looked but didn't find a Jira issue.
>
> -Sean
>
>
> On 9/7/2011 8:29 PM, Dmitriy Ryaboy wrote:
>
>> Hi Sean, this is fixed in Pig 0.9
>>
>> -Dmitriy
>>
>> On Wed, Sep 7, 2011 at 2:07 PM, Sean Timm<Ti...@aol.com> wrote:
>>
>> I'm using Pig 0.8.1.
>>>
>>> I recieved an error trying to use a dynamic invoker with
>>> URLDecoder.decode(String, String) caused by java.lang.****
>>> NoClassDefFoundError:
>>> com/google/common/collect/Sets which is used by
>>> org.apache.builtin.Invoker
>>> and packaged in pig-0.8.1-core.jar. To get around this issue I had to
>>> register the pig jar as in the example below. This doesn't seem like it
>>> should be necessary, though I do see one other reference to this in a
>>> prior
>>> e-mail thread between Dmitry Ryaboy and Dan Brickley back in March (
>>> http://mail-archives.apache.****org/mod_mbox/pig-user/201103.****
>>> mbox/%3CAANLkTingb3=5X3e9XzU=****kwfXzm9JH833Cj5k2+MiBUOO@**mail.**
>>> gmail.com%3E<http://mail-**archives.apache.org/mod_mbox/**
>>> pig-user/201103.mbox/%**3CAANLkTingb3=5X3e9XzU=**
>>> kwfXzm9JH833Cj5k2+MiBUOO@mail.**gmail.com%3E<http://mail-archives.apache.org/mod_mbox/pig-user/201103.mbox/%3CAANLkTingb3=5X3e9XzU=kwfXzm9JH833Cj5k2+MiBUOO@mail.gmail.com%3E>
>>> >
>>>
>>> ).
>>>
>>> Is this how it should work, or am I doing something wrong?
>>>
>>> REGISTER $PIG_DIR/pig-0.8.1-core.jar
>>> DEFINE UrlDecode InvokeForString('java.net.****URLDecoder.decode',
>>> 'String
>>> String');
>>> data = LOAD file AS a:chararray;
>>> foo = FOREACH data GENERATE UrlDecode(a, 'UTF-8') AS a;
>>>
>>> Thanks,
>>> Sean
>>>
>>>
Re: dynamic invoker error Caused by: java.lang.NoClassDefFoundError:
com/google/common/collect/Sets
Posted by Sean Timm <Ti...@aol.com>.
Thanks! I looked but didn't find a Jira issue.
-Sean
On 9/7/2011 8:29 PM, Dmitriy Ryaboy wrote:
> Hi Sean, this is fixed in Pig 0.9
>
> -Dmitriy
>
> On Wed, Sep 7, 2011 at 2:07 PM, Sean Timm<Ti...@aol.com> wrote:
>
>> I'm using Pig 0.8.1.
>>
>> I recieved an error trying to use a dynamic invoker with
>> URLDecoder.decode(String, String) caused by java.lang.**NoClassDefFoundError:
>> com/google/common/collect/Sets which is used by org.apache.builtin.Invoker
>> and packaged in pig-0.8.1-core.jar. To get around this issue I had to
>> register the pig jar as in the example below. This doesn't seem like it
>> should be necessary, though I do see one other reference to this in a prior
>> e-mail thread between Dmitry Ryaboy and Dan Brickley back in March (
>> http://mail-archives.apache.**org/mod_mbox/pig-user/201103.**
>> mbox/%3CAANLkTingb3=5X3e9XzU=**kwfXzm9JH833Cj5k2+MiBUOO@mail.**
>> gmail.com%3E<http://mail-archives.apache.org/mod_mbox/pig-user/201103.mbox/%3CAANLkTingb3=5X3e9XzU=kwfXzm9JH833Cj5k2+MiBUOO@mail.gmail.com%3E>
>> ).
>>
>> Is this how it should work, or am I doing something wrong?
>>
>> REGISTER $PIG_DIR/pig-0.8.1-core.jar
>> DEFINE UrlDecode InvokeForString('java.net.**URLDecoder.decode', 'String
>> String');
>> data = LOAD file AS a:chararray;
>> foo = FOREACH data GENERATE UrlDecode(a, 'UTF-8') AS a;
>>
>> Thanks,
>> Sean
>>
Re: dynamic invoker error Caused by: java.lang.NoClassDefFoundError: com/google/common/collect/Sets
Posted by Dmitriy Ryaboy <dv...@gmail.com>.
Hi Sean, this is fixed in Pig 0.9
-Dmitriy
On Wed, Sep 7, 2011 at 2:07 PM, Sean Timm <Ti...@aol.com> wrote:
> I'm using Pig 0.8.1.
>
> I recieved an error trying to use a dynamic invoker with
> URLDecoder.decode(String, String) caused by java.lang.**NoClassDefFoundError:
> com/google/common/collect/Sets which is used by org.apache.builtin.Invoker
> and packaged in pig-0.8.1-core.jar. To get around this issue I had to
> register the pig jar as in the example below. This doesn't seem like it
> should be necessary, though I do see one other reference to this in a prior
> e-mail thread between Dmitry Ryaboy and Dan Brickley back in March (
> http://mail-archives.apache.**org/mod_mbox/pig-user/201103.**
> mbox/%3CAANLkTingb3=5X3e9XzU=**kwfXzm9JH833Cj5k2+MiBUOO@mail.**
> gmail.com%3E<http://mail-archives.apache.org/mod_mbox/pig-user/201103.mbox/%3CAANLkTingb3=5X3e9XzU=kwfXzm9JH833Cj5k2+MiBUOO@mail.gmail.com%3E>
> ).
>
> Is this how it should work, or am I doing something wrong?
>
> REGISTER $PIG_DIR/pig-0.8.1-core.jar
> DEFINE UrlDecode InvokeForString('java.net.**URLDecoder.decode', 'String
> String');
> data = LOAD file AS a:chararray;
> foo = FOREACH data GENERATE UrlDecode(a, 'UTF-8') AS a;
>
> Thanks,
> Sean
>