Grokbase Groups Pig user April 2012
FAQ
Hi,

I have set the PIG_CALSSPATH and CLASS_PATH pointing to the location of jython
jar file and my python program is in the same location as my pig script.

But I am encountering the following error.
Pig Stack Trace
---------------
ERROR 1000: Error during parsing. could not instantiate
'org.apache.pig.scripting.jython.JythonFunction' with arguments
'[/home/devi/customer.py, cname]'
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during
parsing. could not instantiate 'org.apache.pig.scripting.jython.JythonFunction'
with arguments '[/home/devi/customer.py, cname]'
at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1618)
at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1562)
at org.apache.pig.PigServer.registerQuery(PigServer.java:534)
at
org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:871)
at
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:388)


Any help would be appreciated.

Thanks, Devi

Search Discussions

  • Rajgopal Vaithiyanathan at Apr 20, 2012 at 7:11 am
    correct the spelling of PIG_CALSSPATH to PIG_CLASSPATH
    and its not CLASS_PATH .. just CLASSPATH

    did you export them? like..

    $ CLASSPATH=/path/to/jar_file1.jar:/path/to/jar_file2.jar:/path/to/jar_file3
    .jar
    $ PIG_CLASSPATH=
    /path/to/jar_file1.jar:/path/to/jar_file2.jar:/path/to/jar_file3.jar
    $
    $ export CLASSPATH
    $ export PIG_CLASSPATH


    Raj :)
    On Fri, Apr 20, 2012 at 2:00 AM, kumar palaniappan wrote:

    Hi,

    I have set the PIG_CALSSPATH and CLASS_PATH pointing to the location of
    jython
    jar file and my python program is in the same location as my pig script.

    But I am encountering the following error.
    Pig Stack Trace
    ---------------
    ERROR 1000: Error during parsing. could not instantiate
    'org.apache.pig.scripting.jython.JythonFunction' with arguments
    '[/home/devi/customer.py, cname]'
    org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error
    during
    parsing. could not instantiate
    'org.apache.pig.scripting.jython.JythonFunction'
    with arguments '[/home/devi/customer.py, cname]'
    at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1618)
    at
    org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1562)
    at org.apache.pig.PigServer.registerQuery(PigServer.java:534)
    at
    org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:871)
    at

    org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:388)


    Any help would be appreciated.

    Thanks, Devi


    --
    Thanks and Regards,
    Rajgopal Vaithiyanathan.
  • Devi Kumarappan at Apr 30, 2012 at 11:25 pm
    I had the CLASSPATH set right.But the problem happen to be the jython version.
    When I installed jython 2.5.0, the problem got resolved.




    ________________________________
    From: Rajgopal Vaithiyanathan <raja.fire@gmail.com>
    To: user@pig.apache.org
    Sent: Fri, April 20, 2012 12:11:38 AM
    Subject: Re: Pig not able to instantiate Python UDF

    correct the spelling of PIG_CALSSPATH to PIG_CLASSPATH
    and its not CLASS_PATH .. just CLASSPATH

    did you export them? like..

    $ CLASSPATH=/path/to/jar_file1.jar:/path/to/jar_file2.jar:/path/to/jar_file3
    .jar
    $ PIG_CLASSPATH=
    /path/to/jar_file1.jar:/path/to/jar_file2.jar:/path/to/jar_file3.jar
    $
    $ export CLASSPATH
    $ export PIG_CLASSPATH


    Raj :)
    On Fri, Apr 20, 2012 at 2:00 AM, kumar palaniappan wrote:

    Hi,

    I have set the PIG_CALSSPATH and CLASS_PATH pointing to the location of
    jython
    jar file and my python program is in the same location as my pig script.

    But I am encountering the following error.
    Pig Stack Trace
    ---------------
    ERROR 1000: Error during parsing. could not instantiate
    'org.apache.pig.scripting.jython.JythonFunction' with arguments
    '[/home/devi/customer.py, cname]'
    org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error
    during
    parsing. could not instantiate
    'org.apache.pig.scripting.jython.JythonFunction'
    with arguments '[/home/devi/customer.py, cname]'
    at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1618)
    at
    org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1562)
    at org.apache.pig.PigServer.registerQuery(PigServer.java:534)
    at
    org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:871)
    at

    org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:388)
    )


    Any help would be appreciated.

    Thanks, Devi


    --
    Thanks and Regards,
    Rajgopal Vaithiyanathan.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriespig, hadoop
postedApr 19, '12 at 8:31p
activeApr 30, '12 at 11:25p
posts3
users2
websitepig.apache.org

People

Translate

site design / logo © 2021 Grokbase