You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Fabian Alenius (JIRA)" <ji...@apache.org> on 2012/04/22 16:29:35 UTC

[jira] [Created] (PIG-2657) Print warning if using wrong jython version

Fabian Alenius created PIG-2657:
-----------------------------------

             Summary: Print warning if using wrong jython version
                 Key: PIG-2657
                 URL: https://issues.apache.org/jira/browse/PIG-2657
             Project: Pig
          Issue Type: Bug
            Reporter: Fabian Alenius


Hi,

It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.

Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2657) Print warning if using wrong jython version

Posted by "Johnny Zhang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johnny Zhang updated PIG-2657:
------------------------------

    Attachment: PIG-2657.3.patch

[~cheolsoo], here is the new patch based on your comments.
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>              Labels: newbie
>             Fix For: 0.12
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch, PIG-2657.3.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2657) Print warning if using wrong jython version

Posted by "Jonathan Coveney (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479186#comment-13479186 ] 

Jonathan Coveney commented on PIG-2657:
---------------------------------------

Bumping again. Gotta love that JIRA report.
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>             Fix For: 0.11, 0.10.1
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-2657) Print warning if using wrong jython version

Posted by "Fabian Alenius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabian Alenius updated PIG-2657:
--------------------------------

    Status: Open  (was: Patch Available)
    
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>         Attachments: jython_patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2657) Print warning if using wrong jython version

Posted by "Gianmarco De Francisci Morales (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266613#comment-13266613 ] 

Gianmarco De Francisci Morales commented on PIG-2657:
-----------------------------------------------------

Hi,
thanks for sending a patch.
I have one concern, on which I would like advice from the community.
Hardcoding version numbers in the source is not maintainable in the long run in my opinion (we will forget about this when we upgrade jython).
Is there a way to programmatically and portably get the version number?
It would be easy to read the ivy/library.properties file and get the jython.version property, however this file is not bundled with pig.jar.
My suggestion would be to put this information in the MANIFEST.MF, which is created by ant.
This way it is easily recoverable from within the jar and it is easy to put there because the version number is available during the build process.

Thoughts?
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>         Attachments: PIG-2657.1.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2657) Print warning if using wrong jython version

Posted by "Cheolsoo Park (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cheolsoo Park updated PIG-2657:
-------------------------------

    Labels: newbie  (was: )

Additional comments:
- Please remove tabs. Use 4 space instead.
- The property {{jython.version}} shouldn't be hard-coded in {{build.xml}}. It is automatically loaded from {{ivy/libraries.properties}} at compile-time, so no reason to define it.
- The {{jython.version}} attribute shouldn't be embedded in {{pigunit.jar}}. It's useful only in {{pig.jar}} and {{pig-withouthadoop.jar}}.
- Regarding the log message, why don't we print a message like "Pig is tested with ${jython.version}, so it may not work with ${runtime.jython.version}"? I think that this is flexible and informative at the same time.

Thanks!
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>              Labels: newbie
>             Fix For: 0.12
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-2657) Print warning if using wrong jython version

Posted by "Fabian Alenius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabian Alenius updated PIG-2657:
--------------------------------

    Release Note: Log a warning if jython version is not 2.5.0
          Status: Patch Available  (was: Open)

Log a warning if jython version is not 2.5.0
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>         Attachments: PIG-2657.1.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2657) Print warning if using wrong jython version

Posted by "Johnny Zhang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13496473#comment-13496473 ] 

Johnny Zhang commented on PIG-2657:
-----------------------------------

[~cheolsoo], agree with that. Unless we can find a better way to detect Jython version, we should not push it in.
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>              Labels: newbie
>             Fix For: 0.12
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch, PIG-2657.3.patch, PIG-2657.4.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2657) Print warning if using wrong jython version

Posted by "Jonathan Coveney (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13465829#comment-13465829 ] 

Jonathan Coveney commented on PIG-2657:
---------------------------------------

Bump. Daniel, I'm also unsure of what you mean.
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>             Fix For: 0.11, 0.10.1
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2657) Print warning if using wrong jython version

Posted by "Fabian Alenius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13268976#comment-13268976 ] 

Fabian Alenius commented on PIG-2657:
-------------------------------------

Daniel:

How should this be done? Can you explain in more detail what you mean?
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>             Fix For: 0.11, 0.10.1
>
>         Attachments: PIG-2657.1.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2657) Print warning if using wrong jython version

Posted by "Fabian Alenius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13269084#comment-13269084 ] 

Fabian Alenius commented on PIG-2657:
-------------------------------------

I've added another patch that works the way Gianmarco described. I.e. storing the jython version in the build.xml file and loading it from MANIFEST.MF.
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>             Fix For: 0.11, 0.10.1
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2657) Print warning if using wrong jython version

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13480902#comment-13480902 ] 

Daniel Dai commented on PIG-2657:
---------------------------------

I probably get confused with PIG-2665. The patch looks good, +1.
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>             Fix For: 0.11, 0.10.1
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2657) Print warning if using wrong jython version

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13269829#comment-13269829 ] 

Daniel Dai commented on PIG-2657:
---------------------------------

Hi, Fabian, what I mean is update ivy.xml to use jython-standalone instead of jython.
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>             Fix For: 0.11, 0.10.1
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2657) Print warning if using wrong jython version

Posted by "Cheolsoo Park (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cheolsoo Park updated PIG-2657:
-------------------------------

    Resolution: Won't Fix
        Status: Resolved  (was: Patch Available)

Closing it as a 'won't fix'.
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>              Labels: newbie
>             Fix For: 0.12
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch, PIG-2657.3.patch, PIG-2657.4.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-2657) Print warning if using wrong jython version

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olga Natkovich updated PIG-2657:
--------------------------------

    Fix Version/s:     (was: 0.10.1)
                       (was: 0.11)
                   0.12

Moving to 0.12 based on Rohini's recommendation. Please, move back if you feel it needs to make it to 0.11
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>             Fix For: 0.12
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-2657) Print warning if using wrong jython version

Posted by "Fabian Alenius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabian Alenius updated PIG-2657:
--------------------------------

    Attachment: jython_patch

Log a warning if jython version is not 2.5.0
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>         Attachments: jython_patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2657) Print warning if using wrong jython version

Posted by "Fabian Alenius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabian Alenius updated PIG-2657:
--------------------------------

    Status: Patch Available  (was: Open)
    
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>         Attachments: jython_patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2657) Print warning if using wrong jython version

Posted by "Cheolsoo Park (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13496424#comment-13496424 ] 

Cheolsoo Park commented on PIG-2657:
------------------------------------

Hi Johnny,

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:
{code}
#JYTHON_JAR=`echo ${PIG_HOME}/lib/jython*.jar`

#if [ -z "$JYTHON_JAR" ]; then
#    JYTHON_JAR=`echo $PIG_HOME/build/ivy/lib/Pig/jython*.jar`
#    if [ -n "$JYTHON_JAR" ]; then
#        CLASSPATH=${CLASSPATH}:$JYTHON_JAR
#    fi
#fi
{code}
- Set {{PIG_CLASSPATH=/usr/share/java/jython-2.2.1.jar}}.
- Ran a Python UDF.

The result for me is a {{NoClassDefFoundError}} as follows:
{code}
ERROR 2998: Unhandled internal error. org/python/Version

java.lang.NoClassDefFoundError: org/python/Version
	at org.apache.pig.scripting.jython.JythonScriptEngine$Interpreter.<clinit>(JythonScriptEngine.java:92)
{code}
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:
http://grepcode.com/project/repo1.maven.org/maven2/org.python/jython/

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?
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>              Labels: newbie
>             Fix For: 0.12
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch, PIG-2657.3.patch, PIG-2657.4.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2657) Print warning if using wrong jython version

Posted by "Rohini Palaniswamy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485717#comment-13485717 ] 

Rohini Palaniswamy commented on PIG-2657:
-----------------------------------------

[~faal],
  Checking for a fixed version is not helpful when a range of versions is not supported. Currently trunk is packaged with 2.5.2 and this would give a warning for that. If there is a problem with lower version of jython, then we can print a warning saying versions lesser than 2.5.0 are not supported. If we see problem with higher versions of jython, then we need to fix pig to work with them. Can you tell what version of python gives error for you?

And I feel this is more suitable for 0.12 now that 0.11 is branched. If no one has objections, I will move the Fix Version to 0.12.
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>             Fix For: 0.11, 0.10.1
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-2657) Print warning if using wrong jython version

Posted by "Fabian Alenius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabian Alenius updated PIG-2657:
--------------------------------

    Status: Open  (was: Patch Available)
    
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2657) Print warning if using wrong jython version

Posted by "Fabian Alenius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabian Alenius updated PIG-2657:
--------------------------------

    Status: Patch Available  (was: Open)

Log a warning if jython version is not 2.5.0

Tested against trunk.
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>         Attachments: jython_patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2657) Print warning if using wrong jython version

Posted by "Cheolsoo Park (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499498#comment-13499498 ] 

Cheolsoo Park commented on PIG-2657:
------------------------------------

I'd like to close this jira as a 'won't fix'. Please let me if anyone has objections.
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>              Labels: newbie
>             Fix For: 0.12
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch, PIG-2657.3.patch, PIG-2657.4.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-2657) Print warning if using wrong jython version

Posted by "Fabian Alenius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabian Alenius updated PIG-2657:
--------------------------------

    Attachment:     (was: jython_patch)
    
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2657) Print warning if using wrong jython version

Posted by "Fabian Alenius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13269831#comment-13269831 ] 

Fabian Alenius commented on PIG-2657:
-------------------------------------

Ah, hm will that mean the wrong version can not be loaded?
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>             Fix For: 0.11, 0.10.1
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2657) Print warning if using wrong jython version

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dai updated PIG-2657:
----------------------------

    Fix Version/s: 0.10.1
                   0.11

We shall solve it by pulling the right jython-standalone.jar.
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>             Fix For: 0.11, 0.10.1
>
>         Attachments: PIG-2657.1.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2657) Print warning if using wrong jython version

Posted by "Fabian Alenius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabian Alenius updated PIG-2657:
--------------------------------

    Attachment: PIG-2657.1.patch
    
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>         Attachments: PIG-2657.1.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2657) Print warning if using wrong jython version

Posted by "Cheolsoo Park (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495644#comment-13495644 ] 

Cheolsoo Park commented on PIG-2657:
------------------------------------

Hi Johnny,

Thank you very much for the patch. I have a few more comments:
- I think that you have to swap {{Version.PY_VERSION}} and {{jythonVersion}}.
- Looking at {{JythonScriptEngine.java}} after apply your patch, I see no reason why we nest try-catch blocks here. Can you please move the inner try-catch block to outside the outer one? In addition, can you make it to catch an IOException instead of an Exception since that's specifically what is thrown by {{JarFile}}? Do you agree?
- Please remove tabs in {{build.xml}}.
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>              Labels: newbie
>             Fix For: 0.12
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch, PIG-2657.3.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2657) Print warning if using wrong jython version

Posted by "Gianmarco De Francisci Morales (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13259086#comment-13259086 ] 

Gianmarco De Francisci Morales commented on PIG-2657:
-----------------------------------------------------

It sounds sensible to print a warning.

Please go ahead if you want to send a patch.
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2657) Print warning if using wrong jython version

Posted by "Fabian Alenius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabian Alenius updated PIG-2657:
--------------------------------

    Attachment: PIG-2657.2.patch

New version where the current jython version is stored in the build.xml file.
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>             Fix For: 0.11, 0.10.1
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2657) Print warning if using wrong jython version

Posted by "Johnny Zhang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johnny Zhang updated PIG-2657:
------------------------------

    Attachment: PIG-2657.4.patch

[~cheolsoo], thanks for the comments, 'PIG-2657.4.patch' is the patch based on your comments, I did the positive test and this the warning message printed
{noformat}
2012-11-12 23:45:27,753 [main] WARN  org.apache.pig.scripting.jython.JythonScriptEngine - Pig is tested with 2.5.2, so it may not work with 2.5.0.
{noformat}

the 2.5.2 is the version string define in the /pig/ivy/libraries.properties in trunk, so it is correct. But 2.5.0 seems not the jython version in my env. Mine seems 2.2.1
{noformat}
jython --version
Jython 2.2.1 on java1.6.0_31
{noformat}

what do you think about it ?
                
> Print warning if using wrong jython version
> -------------------------------------------
>
>                 Key: PIG-2657
>                 URL: https://issues.apache.org/jira/browse/PIG-2657
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Fabian Alenius
>              Labels: newbie
>             Fix For: 0.12
>
>         Attachments: PIG-2657.1.patch, PIG-2657.2.patch, PIG-2657.3.patch, PIG-2657.4.patch
>
>
> Hi,
> It would be good if Pig would print a warning (or refuse to run) if you are using an unsupported version of jython. I spent a couple of hours before figuring out that you had to use 2.5.0. I've seen posts indicating that others have run into this problem as well.
> Might write up a patch if others agree this is an issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira