Make sure that in the register, you use the absolute path. Also make sure that 
both the jython.jar and udf asre in your classpath. A good test is to do that, 
then try and register in local mode. If that works, then try on your cluster. 
Always making sure that your classpath has those details

Sent via BlackBerry

-----Original Message-----
From: <deepak....@wipro.com>
Date: Fri, 7 Jan 2011 19:57:16 
To: <user@pig.apache.org>
Reply-To: user@pig.apache.org
Subject: Python UDF Internal Error when Registering

Hi,

I get an error when I try to register my python udf. Why is this happening?

grunt> Register 'udf.py' USING jython AS udf
2011-01-07 19:39:31,818 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 
2998: Unhandled internal error. org/python/util/PythonInterpreter

The Logs say the following:

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
================================================================================
Any ideas?


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

Reply via email to