Thank you very much for your time and effort. But I don't think that you tested it correctly. I think that jython 2.5.0 is present somewhere in your classpath, and that's why you're seeing that message. Here is my test using jython 2.2.1:
- Commented out the following lines in bin/pig so that jython 2.5.x is not present in my classpath. If you don't do this, you will end up with 2 versions of Jython in classpath:
#if [ -z "$JYTHON_JAR" ]; then
# JYTHON_JAR=`echo $PIG_HOME/build/ivy/lib/Pig/jython*.jar`
# if [ -n "$JYTHON_JAR" ]; then
- Set PIG_CLASSPATH=/usr/share/java/jython-2.2.1.jar.
- Ran a Python UDF.
The result for me is a NoClassDefFoundError as follows:
ERROR 2998: Unhandled internal error. org/python/Version
The reason is because the org.python.Version class is introduced in Jython 2.5.x, and thus doesn't exist in Jython 2.2.x:
In fact, this gives me a pause. By doing this, we're going to introduce a backward incompatibility with Jython releases prior to 2.5.x. For example, there may be some Python UDFs that used to work with Jython 2.2.x but will no longer work because of this change. After all, I am not sure if it is worthwhile to fix. Thoughts?