You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Cameron Smith (JIRA)" <ji...@apache.org> on 2006/12/06 22:40:21 UTC

[jira] Created: (OFBIZ-528) Upgrade Beanshell library to version 2.0b4

Upgrade Beanshell library to version 2.0b4
------------------------------------------

                 Key: OFBIZ-528
                 URL: http://issues.apache.org/jira/browse/OFBIZ-528
             Project: OFBiz (The Open for Business Project)
          Issue Type: Improvement
          Components: framework
    Affects Versions: SVN trunk
         Environment: Windows XP, MySQL 5.0, JDK1.5, ofbiz_opentaps_473442
            Reporter: Cameron Smith


As discussed recently on ofbiz-users mailing list, I proposed to upgrade the Beanshell jar used by OFBiz (framework/base/lib/scripting/bsh.jar), which is based on a 1.3a1, to the current "stable" version, 2.0b4.

This has the following advantages:
 - JDK1.5 interpretation capability
 - various bugfixes

However as explained by David E. Jones here:
http://docs.ofbiz.org/display/OFBTECH/OFBiz+Customized+BeanShell+Source+%28with+ParsedScript+object%29

...it will be necessary to patch the source to allow for the script parsing on which OFBiz depends.

This fix MAY also resolve this bug:
https://issues.apache.org/jira/browse/OFBIZ-303

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-528) Upgrade Beanshell library to version 2.0b4

Posted by "Cameron Smith (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-528?page=comments#action_12456709 ] 
            
Cameron Smith commented on OFBIZ-528:
-------------------------------------

David, please read my previous comments carefully - I specifically did not submit anything as a patch because I wanted your and others' feedback, and also because I wanted to do more testing beforehand.

There is no point me submitting a patched viewprofile.sh if there are 10 other scripts which will break in the same way because of null-handling, but I did not come across them!  If there are web-based regression tests for OFBiz I will happily run them, but I believe we do not yet have these.  Which is why I reckon it would be better, for such a fundamental bit of the system, for someone else to read over the code changes.

I am happy to submit the Interpreter.java and BshClassManager.java changes as patches, but against what?  Since these files are not in the OFBiz source tree, and much of the rest of the code has changed between 1.3.x and 2.x, I believe I should submit them as patches versus Beanshell source, and not against your original 1.3.x patched versions.  What do you think?

Finally, my understanding is that the OFBiz weekly builds which I am using come straight from the trunk, at a certain known SVN version.  Since it is impractical for me to check out the source directly from trunk (due to bandwidth issues here in Moz), what I have done in previous patches I have submitted, is downloaded the immediately previous weekly build (which still includes .svn subdirs), "linked it" to the SVN trunk via Subclipse, and then manually updated the files in the specific area I am changing to the trunk version if necessary.   Finally, I make the patch against these trunk versions.

I await your feedback on these points before proceeding.

> Upgrade Beanshell library to version 2.0b4
> ------------------------------------------
>
>                 Key: OFBIZ-528
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-528
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: Windows XP, MySQL 5.0, JDK1.5, ofbiz_opentaps_473442
>            Reporter: Cameron Smith
>         Attachments: bsh-2.0b4-mod-ofbiz.jar, BshClassManager.java, Interpreter.java, viewprofile.bsh
>
>
> As discussed recently on ofbiz-users mailing list, I proposed to upgrade the Beanshell jar used by OFBiz (framework/base/lib/scripting/bsh.jar), which is based on a 1.3a1, to the current "stable" version, 2.0b4.
> This has the following advantages:
>  - JDK1.5 interpretation capability
>  - various bugfixes
> However as explained by David E. Jones here:
> http://docs.ofbiz.org/display/OFBTECH/OFBiz+Customized+BeanShell+Source+%28with+ParsedScript+object%29
> ...it will be necessary to patch the source to allow for the script parsing on which OFBiz depends.
> This fix MAY also resolve this bug:
> https://issues.apache.org/jira/browse/OFBIZ-303

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OFBIZ-528) Upgrade Beanshell library to version 2.0b4

Posted by "Cameron Smith (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-528?page=all ]

Cameron Smith updated OFBIZ-528:
--------------------------------

    Attachment: Interpreter.java
                BshClassManager.java
                bsh-2.0b4-mod-ofbiz.jar

Beanshell 2.0b4, patched to allow script parsing, based on David Jones' original changes from: http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=741

> Upgrade Beanshell library to version 2.0b4
> ------------------------------------------
>
>                 Key: OFBIZ-528
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-528
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: Windows XP, MySQL 5.0, JDK1.5, ofbiz_opentaps_473442
>            Reporter: Cameron Smith
>         Attachments: bsh-2.0b4-mod-ofbiz.jar, BshClassManager.java, Interpreter.java
>
>
> As discussed recently on ofbiz-users mailing list, I proposed to upgrade the Beanshell jar used by OFBiz (framework/base/lib/scripting/bsh.jar), which is based on a 1.3a1, to the current "stable" version, 2.0b4.
> This has the following advantages:
>  - JDK1.5 interpretation capability
>  - various bugfixes
> However as explained by David E. Jones here:
> http://docs.ofbiz.org/display/OFBTECH/OFBiz+Customized+BeanShell+Source+%28with+ParsedScript+object%29
> ...it will be necessary to patch the source to allow for the script parsing on which OFBiz depends.
> This fix MAY also resolve this bug:
> https://issues.apache.org/jira/browse/OFBIZ-303

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-528) Upgrade Beanshell library to version 2.0b4

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-528?page=comments#action_12456521 ] 
            
David E. Jones commented on OFBIZ-528:
--------------------------------------

I haven't reviewed the rest of this, but in general submissions that are intended for the OFBiz trunk should be tested against the OFBiz trunk, and not against an opentaps or any other OFBiz distribution that may have changes that would affect the issue.

> Upgrade Beanshell library to version 2.0b4
> ------------------------------------------
>
>                 Key: OFBIZ-528
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-528
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: Windows XP, MySQL 5.0, JDK1.5, ofbiz_opentaps_473442
>            Reporter: Cameron Smith
>         Attachments: bsh-2.0b4-mod-ofbiz.jar, BshClassManager.java, Interpreter.java, viewprofile.bsh
>
>
> As discussed recently on ofbiz-users mailing list, I proposed to upgrade the Beanshell jar used by OFBiz (framework/base/lib/scripting/bsh.jar), which is based on a 1.3a1, to the current "stable" version, 2.0b4.
> This has the following advantages:
>  - JDK1.5 interpretation capability
>  - various bugfixes
> However as explained by David E. Jones here:
> http://docs.ofbiz.org/display/OFBTECH/OFBiz+Customized+BeanShell+Source+%28with+ParsedScript+object%29
> ...it will be necessary to patch the source to allow for the script parsing on which OFBiz depends.
> This fix MAY also resolve this bug:
> https://issues.apache.org/jira/browse/OFBIZ-303

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OFBIZ-528) Upgrade Beanshell library to version 2.0b4

Posted by "Cameron Smith (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-528?page=all ]

Cameron Smith updated OFBIZ-528:
--------------------------------

    Attachment: viewprofile.bsh

Example of necessary alteration to existing beanshell script, for null handling

> Upgrade Beanshell library to version 2.0b4
> ------------------------------------------
>
>                 Key: OFBIZ-528
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-528
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: Windows XP, MySQL 5.0, JDK1.5, ofbiz_opentaps_473442
>            Reporter: Cameron Smith
>         Attachments: bsh-2.0b4-mod-ofbiz.jar, BshClassManager.java, Interpreter.java, viewprofile.bsh
>
>
> As discussed recently on ofbiz-users mailing list, I proposed to upgrade the Beanshell jar used by OFBiz (framework/base/lib/scripting/bsh.jar), which is based on a 1.3a1, to the current "stable" version, 2.0b4.
> This has the following advantages:
>  - JDK1.5 interpretation capability
>  - various bugfixes
> However as explained by David E. Jones here:
> http://docs.ofbiz.org/display/OFBTECH/OFBiz+Customized+BeanShell+Source+%28with+ParsedScript+object%29
> ...it will be necessary to patch the source to allow for the script parsing on which OFBiz depends.
> This fix MAY also resolve this bug:
> https://issues.apache.org/jira/browse/OFBIZ-303

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-528) Upgrade Beanshell library to version 2.0b4

Posted by "Cameron Smith (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-528?page=comments#action_12456340 ] 
            
Cameron Smith commented on OFBIZ-528:
-------------------------------------

The attached files are for validation and testing by the community.  They were compiled against 1.5.  If I don't hear anything to the contrary in the next few days, I will get the upcoming weekly build on friday, and recompile and test everything with both JDK1.4 and JDK1.5 before submitting final versions of everything.

I would like people's opinions on the following points especially...
 a. I suggested a clearer name for the new jar, in keeping with the current effort to include versions in jar names, which I wholeheartedly support
 b. BshClassManager.createClassManager()  is now just a convenience method, because of changes within Beanshell since 1.3.x.  I believe we should in fact ditch this method for two reasons...
  i. It is one less difference between our source and orig. Beanshell source
  ii.  Within OFBiz source (BshUtil.getMasterInterpreter), it is clearer what we are doing if we explicitly call createClassManager(null)
 c. There appears to be somewhat different handling of nulls in this version of Beanshell.  I have not investigated fully yet, but I had to tweak at least one script for compatibility.  There may be others.  For example look at attached viewprofile.bsh, line 89.  In "pure java", I should definitely not have had to concatenate an empty String before passing in the argument to Boolean.valueOf().

Anyway, the attached code has been submitted to the following tests:
 1. ofbiz_opentaps_473442 builds cleanly against this jar
 2. All OFBiz screens THAT I HAD NOTICED which previously were breaking with bsh, are now working.  In one case, (see notes above) I had to slightly tweak the file.
 3. ZK 2.1.2, which did not work with original bsh.jar, works perfectly
 4. The beanshell 2.0b4 "test suite", runs with exactly the same passes and fails that it shows when run against the original 2.0b4.

> Upgrade Beanshell library to version 2.0b4
> ------------------------------------------
>
>                 Key: OFBIZ-528
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-528
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: Windows XP, MySQL 5.0, JDK1.5, ofbiz_opentaps_473442
>            Reporter: Cameron Smith
>         Attachments: bsh-2.0b4-mod-ofbiz.jar, BshClassManager.java, Interpreter.java, viewprofile.bsh
>
>
> As discussed recently on ofbiz-users mailing list, I proposed to upgrade the Beanshell jar used by OFBiz (framework/base/lib/scripting/bsh.jar), which is based on a 1.3a1, to the current "stable" version, 2.0b4.
> This has the following advantages:
>  - JDK1.5 interpretation capability
>  - various bugfixes
> However as explained by David E. Jones here:
> http://docs.ofbiz.org/display/OFBTECH/OFBiz+Customized+BeanShell+Source+%28with+ParsedScript+object%29
> ...it will be necessary to patch the source to allow for the script parsing on which OFBiz depends.
> This fix MAY also resolve this bug:
> https://issues.apache.org/jira/browse/OFBIZ-303

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-528) Upgrade Beanshell library to version 2.0b4

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-528?page=comments#action_12456528 ] 
            
David E. Jones commented on OFBIZ-528:
--------------------------------------

Could you submit the viewprofile.bsh changes as a patch file instead of the complete file?

Also for the Interpreter.java and BshClassManager.java files could you submit those as patches as well?

Patches can be created with something like "svn diff > changes.patch" or "diff -u file1 file2 > changes.patch"

> Upgrade Beanshell library to version 2.0b4
> ------------------------------------------
>
>                 Key: OFBIZ-528
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-528
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: Windows XP, MySQL 5.0, JDK1.5, ofbiz_opentaps_473442
>            Reporter: Cameron Smith
>         Attachments: bsh-2.0b4-mod-ofbiz.jar, BshClassManager.java, Interpreter.java, viewprofile.bsh
>
>
> As discussed recently on ofbiz-users mailing list, I proposed to upgrade the Beanshell jar used by OFBiz (framework/base/lib/scripting/bsh.jar), which is based on a 1.3a1, to the current "stable" version, 2.0b4.
> This has the following advantages:
>  - JDK1.5 interpretation capability
>  - various bugfixes
> However as explained by David E. Jones here:
> http://docs.ofbiz.org/display/OFBTECH/OFBiz+Customized+BeanShell+Source+%28with+ParsedScript+object%29
> ...it will be necessary to patch the source to allow for the script parsing on which OFBiz depends.
> This fix MAY also resolve this bug:
> https://issues.apache.org/jira/browse/OFBIZ-303

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira