Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351482

Summary: BIRT does not work with Rhino (org.mozilla.javascript) 1.7R4
Product: z_Archived Reporter: Andrew Overholt <overholt>
Component: BIRTAssignee: Yulin Wang <Lionel.wyl>
Status: VERIFIED FIXED QA Contact: Galina Derenshteyn <gderenshteyn>
Severity: normal    
Priority: P3 CC: arkadi.shishlov, bluesoldier, Lionel.wyl, milesparker, omk8421, schlosna
Version: unspecified   
Target Milestone: 4.5.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 389187    
Bug Blocks: 462696    
Attachments:
Description Flags
first go at a patch to update
none
first go at a patch to update to Rhino 1.7R3 none

Description Andrew Overholt CLA 2011-07-07 14:44:38 EDT
org.mozilla.javascript.ScriptOrFnNode is removed in Rhino 1.7R3.  AFAICT, org.eclipse.birt.core.data.OlapExpressionCompiler and org.eclipse.birt.core.data.ExpressionParserUtility are the only classes that are affected by this.  In fact, all plugins that are a part of the birt.chart feature (checked out from CVS HEAD as of 2011-07-07) compile just fine with Rhino 1.7R3 except org.eclipse.birt.core which contains the aforementioned two classes.

One concern might be that org.eclipse.birt.core's MANIFEST.MF contains this:  org.mozilla.javascript;bundle-version="[1.6.0,2.0.0)";visibility:=reexport.  Moving 1.7R3 will likely affect consumers due to API changes.  The range may also need to be tweaked if Rhino upstream doesn't have a strict API policy (as would appear to be the case; note:  I'm not familiar with Rhino upstream or their API policy).

I'm not planning to update Rhino to 1.7R3 in Orbit right now, but it might be worth moving for Juno seeing as 1.7R3 was released 2011-06-03 and is the latest upstream release.  New in Rhino 1.7R3:

https://developer.mozilla.org/en/New_in_Rhino_1.7R3

I've put up an attempt at a 1.7R3 bundle here:

http://fedorapeople.org/~overholt/org.mozilla.javascript_1.7.3.201107071437.jar

in case anyone wants to try it out.

Thanks.
Comment 1 Andrew Overholt CLA 2011-12-07 08:57:18 EST
Created attachment 208049 [details]
first go at a patch to update

I've been picking away at this over the past few days but I think I'm at the point that someone from BIRT should take a look.  This patch is a simple change to use the new API in 1.7R3.  I get 2 errors with the birt.core test suite and ~30 failures.  The errors seem to come from ExpressionParserUtility.  I think it needs to be updated to work with the new AST API in Rhino 1.7R3.
Comment 2 Andrew Overholt CLA 2011-12-07 09:00:45 EST
Updating summary.
Comment 3 Andrew Overholt CLA 2011-12-07 09:45:20 EST
Created attachment 208051 [details]
first go at a patch to update to Rhino 1.7R3
Comment 4 Miles Parker CLA 2011-12-30 21:07:23 EST
I'm getting hit with this on my build. Buckminster can't seem to resolve it anyway..

BTW, I'm wondering if it is possible to move the o.m.javascript dependencies out of birt.core altogether? I ask because I use the chart engine stuff and AFAICT there is no need for the expression stuff in there at all.
Comment 5 Miles Parker CLA 2012-03-23 13:14:34 EDT
Has this patch been applied? This one is really critical for build consumers.
Comment 6 Andrew Overholt CLA 2012-09-10 15:48:06 EDT
Updating to request an update to 1.7R4 (new Orbit bug).
Comment 8 Galina Derenshteyn CLA 2015-05-29 20:25:32 EDT
verified in the build from 5/28 that the issue was resolved.