Grokbase Groups Pig user May 2011
FAQ
I am having problems getting the simple example Python UDFs from http://wiki.apache.org/pig/UDFsUsingScriptingLanguages to work. Stack trace:


Pig Stack Trace
---------------
ERROR 2998: Unhandled internal error. org/python/util/PythonInterpreter

java.lang.NoClassDefFoundError: org/python/util/PythonInterpreter
at org.apache.pig.scripting.jython.JythonScriptEngine$Interpreter.(JythonScriptEngine.java:105)
at org.apache.pig.PigServer.registerCode(PigServer.java:507)
at org.apache.pig.tools.grunt.GruntParser.processRegister(GruntParser.java:381)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:421)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:165)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:141)
at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:90)
at org.apache.pig.Main.run(Main.java:510)
at org.apache.pig.Main.main(Main.java:107)
Caused by: java.lang.ClassNotFoundException: org.python.util.PythonInterpreter
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 10 more
================================================================================
From what I have been able to see in the archives the most common cause of this error seems to be that jython.jar is not in the classpath; I've checked and mine is in the classpath. I have the full path to both jython.jar and test.py in the pig script. Are there other causes that might produce this error? Python is in /usr/local/bin rather than /usr/bin; would that produce this, and if so how would I address the error?
Thanks,
Andrea Leistra

________________________________
This e-mail message is authorized for use by the intended recipient only and may contain information that is privileged and confidential. If you received this message in error, please call us immediately at (425) 702-8808 and ask to speak to the message sender. Please do not copy, disseminate, or retain this message unless you are the intended recipient. In addition, to ensure the security of your data, please do not send any unencrypted credit card or personally identifiable information to this email address. Thank you.

Search Discussions

  • Daniel Eklund at May 10, 2011 at 7:57 pm
    try putting jython.jar in your PIG_CLASSPATH... that worked for me... I see
    you have the absolute path to your jython.jar mentioned. Once I took care
    of those, things started working.

    On Tue, May 10, 2011 at 2:43 PM, Andrea Leistra
    wrote:
    I am having problems getting the simple example Python UDFs from
    http://wiki.apache.org/pig/UDFsUsingScriptingLanguages to work. Stack
    trace:


    Pig Stack Trace
    ---------------
    ERROR 2998: Unhandled internal error. org/python/util/PythonInterpreter

    java.lang.NoClassDefFoundError: org/python/util/PythonInterpreter
    at
    org.apache.pig.scripting.jython.JythonScriptEngine$Interpreter.<clinit>(JythonScriptEngine.java:54)
    at
    org.apache.pig.scripting.jython.JythonScriptEngine.registerFunctions(JythonScriptEngine.java:105)
    at org.apache.pig.PigServer.registerCode(PigServer.java:507)
    at
    org.apache.pig.tools.grunt.GruntParser.processRegister(GruntParser.java:381)
    at
    org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:421)
    at
    org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:165)
    at
    org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:141)
    at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:90)
    at org.apache.pig.Main.run(Main.java:510)
    at org.apache.pig.Main.main(Main.java:107)
    Caused by: java.lang.ClassNotFoundException:
    org.python.util.PythonInterpreter
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 10 more

    ================================================================================

    From what I have been able to see in the archives the most common cause of
    this error seems to be that jython.jar is not in the classpath; I've checked
    and mine is in the classpath. I have the full path to both jython.jar and
    test.py in the pig script. Are there other causes that might produce
    this error? Python is in /usr/local/bin rather than /usr/bin; would that
    produce this, and if so how would I address the error?

    Thanks,
    Andrea Leistra

    ________________________________
    This e-mail message is authorized for use by the intended recipient only
    and may contain information that is privileged and confidential. If you
    received this message in error, please call us immediately at (425)
    702-8808 and ask to speak to the message sender. Please do not copy,
    disseminate, or retain this message unless you are the intended recipient.
    In addition, to ensure the security of your data, please do not send any
    unencrypted credit card or personally identifiable information to this email
    address. Thank you.
  • Deepak N85 at May 11, 2011 at 4:21 am
    Andrea - You may like to check this - http://sundaycomputing.blogspot.com/2011/01/trying-apache-pig-1.html
    ________________________________________
    From: Andrea Leistra [Andrea.Leistra@concur.com]
    Sent: Wednesday, May 11, 2011 1:13 AM
    To: user@pig.apache.org
    Subject: Problems with example Python UDF

    I am having problems getting the simple example Python UDFs from http://wiki.apache.org/pig/UDFsUsingScriptingLanguages to work. Stack trace:


    Pig Stack Trace
    ---------------
    ERROR 2998: Unhandled internal error. org/python/util/PythonInterpreter

    java.lang.NoClassDefFoundError: org/python/util/PythonInterpreter
    at org.apache.pig.scripting.jython.JythonScriptEngine$Interpreter.(JythonScriptEngine.java:105)
    at org.apache.pig.PigServer.registerCode(PigServer.java:507)
    at org.apache.pig.tools.grunt.GruntParser.processRegister(GruntParser.java:381)
    at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:421)
    at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:165)
    at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:141)
    at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:90)
    at org.apache.pig.Main.run(Main.java:510)
    at org.apache.pig.Main.main(Main.java:107)
    Caused by: java.lang.ClassNotFoundException: org.python.util.PythonInterpreter
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 10 more
    ================================================================================
    From what I have been able to see in the archives the most common cause of this error seems to be that jython.jar is not in the classpath; I've checked and mine is in the classpath. I have the full path to both jython.jar and test.py in the pig script. Are there other causes that might produce this error? Python is in /usr/local/bin rather than /usr/bin; would that produce this, and if so how would I address the error?
    Thanks,
    Andrea Leistra

    ________________________________
    This e-mail message is authorized for use by the intended recipient only and may contain information that is privileged and confidential. If you received this message in error, please call us immediately at (425) 702-8808 and ask to speak to the message sender. Please do not copy, disseminate, or retain this message unless you are the intended recipient. In addition, to ensure the security of your data, please do not send any unencrypted credit card or personally identifiable information to this email address. Thank you.

    Please do not print this email unless it is absolutely necessary.

    The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

    WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

    www.wipro.com

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriespig, hadoop
postedMay 10, '11 at 7:44p
activeMay 11, '11 at 4:21a
posts3
users3
websitepig.apache.org

People

Translate

site design / logo © 2021 Grokbase