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

Bug 202947

Summary: API breakage from BIRT 2.1.x to BIRT 2.2 with XML stream
Product: z_Archived Reporter: Sheldon Lee-Loy <sleeloy>
Component: BIRTAssignee: Lin Zhu <lzhu>
Status: CLOSED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: clin, jkubasta, lchan, lzhu, paulslau, xxue
Version: 2.2.0   
Target Milestone: 2.2.1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 202331    

Description Sheldon Lee-Loy CLA 2007-09-11 11:57:42 EDT
This problem is a result of a change in the Constants.APPCONTEXT_INPUTSTREAM.  This is mentioned in Bug #163732:

"The bug is caused by the migration of BIRT xml driver to DTP xml driver. The
legacy code which use constants defined in BIRT xml driver would break. I've
made the report context constants defined in BIRT xml driver and DTP xml driver
consistent to solve the problem."

Public constants should not change between releases.  This is like changing a public api.  This is causing backward compatilbity problems with TPTP.  

This is the scenario that is breaking:

TPTP 4.4.1 is compiled with BIRT 2.2.  As a result the org.eclipse.birt.report.data.oda.xml.Constants.APPCONTEXT_INPUTSTREAM BIRT 2.2 value is inlined in the TPTP 4.4.1 class.  Now, if I use TPTP 4.4.1 with BIRT 2.1.x the reports break because BIRT 2.1.x is expecting a different constant value.  

This is a major problem for other users that have products compiled with BIRT 2.2 and want to run with lower version of BIRT.  

One of the driving forces with using BIRT 2.1.x is that BIRT 2.1.x can be used with JDK 1.4 while BIRT 2.2.x can not use JDK 1.4.
Comment 1 Gary Xue CLA 2007-09-11 20:13:27 EDT
Sheldon - there is no way for us to provide forward compatibility as you suggested (to have BIRT 2.1.3 work with code compiled against 2.2). We are only committed to  provide source- and binary- level backward compatibility, i.e., BIRT 2.2 should work with code written against 2.1.3, whether or not such code has been recompiled against 2.2.

I understand that you want to have a single code base that works with both BIRT 2.1.3 and 2.2.x. This is guaranteed to work only if you compile the code against 2.1.3. If the relevant code only make use of the the XML driver features, you could also work around this by hardcoding the following 2.1.3 AppContext keys (they are no longer available as constants in the 2.2 code base). 

"org.eclipse.birt.report.data.oda.xml.inputStream"
"org.eclipse.birt.report.data.oda.xml.closeInputStream"

Comment 2 Paul Slauenwhite CLA 2007-09-12 12:12:01 EDT
Hi Gary, 

If I understand this correctly, the value of the constant was change between 2.2.0 and 2.2.1.  For example, compiling with BIRT 2.2.0 M1 20061017 should work when running with BIRT 2.1.3.  If so, this is an API breakage and not permitted for a point release:

http://wiki.eclipse.org/index.php/Evolving_Java-based_APIs#Evolving_API_classes_-_API_fields
Comment 3 Lin Zhu CLA 2007-09-12 16:31:37 EDT
We've rollback the constants values in 2.2.0 XML driver so that the API breakage is gone.
Comment 4 Paul Slauenwhite CLA 2009-06-30 09:35:31 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this originator of this enhancement/defect has an inactive Bugzilla account and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.
Comment 5 Paul Slauenwhite CLA 2009-06-30 09:59:49 EDT
This enhancement/defect was mistaken closed as part of the TPTP 4.6 Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes) since the originator of this enhancement/defect has an inactive Bugzilla account.  If this enhancement/defect is still unresolved and reproducible, please re-open.