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

Bug 232966

Summary: BIRT issues with concurrent report executions
Product: z_Archived Reporter: erlich <jerlich>
Component: BIRTAssignee: Vincent Petry <vpetry>
Status: CLOSED FIXED QA Contact: Tianli Zhang <tzhang>
Severity: normal    
Priority: P3 CC: bluesoldier, bonfils, wenfeng.fwd, whe, yli, zqian
Version: 2.2.0   
Target Milestone: 2.3.2   
Hardware: PC   
OS: Windows XP   
Whiteboard: Non-Auto

Description erlich CLA 2008-05-20 09:58:53 EDT
I'm having an issue with executing reports concurrently
I've a webapp that's works on jetty (or tomcat), and uses BIRT to execute reports.. using the viewservlets.jar
The issue is that when I try to execute one report on different tabs/windows on the same explorer/firefox they don't work properly..
For what i could see, BIRT generates a report document each time the report is executed, and this document file path is based on the http session id and report file name.. 
So, if i have 3 browser's windows/tabs using the same report and using the same http session, when i execute the same report (with different parameters), one of these things happens:
- The 3 reports executions show the same report
- One or two of them show an error message saying
"org.eclipse.birt.report.service.api.ReportServiceException: Report document
instance is empty."
- One or two of them show an error message saying "Error Shown on Web-Client:
org.eclipse.birt.report.service.api.ReportServiceException: Can not find the
report design in the report document: {webapp
deploy}\birt\documents\bp8mvv26acii\c3fd4a38\metrifix_report1.rptdocument" 

There should be some kind of execution id to prevent this to happen..
I think synchronizing the servlet is not enough.. because (i think, but i'm not sure) the http request for report document creation is not the same that the http request for report rendering.. but i repeat.. i'm not sure..
Comment 1 erlich CLA 2008-06-02 16:30:28 EDT
Any feedback here?
Comment 2 Wenfeng Li CLA 2008-06-02 16:47:45 EDT
(In reply to comment #1)
> Any feedback here?

This is due to the assumption in viewer that http session can uniquely identify a report execution request. We will look into a solution in 2.3.1.

Suggestion on a solution or a code patch will be a great help.
Comment 3 erlich CLA 2008-06-03 09:28:09 EDT
hmm i think that the best idea is just to put an id to the each report execution, and use that id when naming the report document..
Comment 4 Wenfeng Li CLA 2008-06-13 00:45:07 EDT
Suggest to remove the report document per http session cache.  Each report execution should have its own report document even if the execution requests are from the same http session for the same report.



Comment 5 Zhiqiang Qian CLA 2008-08-21 21:56:14 EDT
Need more investigation.
Comment 6 Vincent Petry CLA 2008-12-12 00:50:29 EST
The BIRT viewer now supports concurrent executions of the same report.
To achieve this, a new sub-session feature has been added. Each time a report is viewed/executed, a sub-session is opened. Since there is no logout mechanism, the sub-sessions will be cleaned according to the configuration found in viewer.properties.
Comment 7 erlich CLA 2008-12-30 08:53:13 EST
My application has security requirements, will this affect that?
Comment 8 Vincent Petry CLA 2008-12-30 21:25:31 EST
It depends what you mean with security requirements.
I think this change doesn't add much more about security. It just ensures that one single user can't mess up the cached report document when using separate browser windows/tabs. It's not related to multi-user, as this is already secured by the use of the tomcat session.
Comment 9 Tianli Zhang CLA 2009-01-05 03:39:24 EST
Verified in 2.3.2 v20090105-0630 build, each execution will open a new sub-session and has its own rptdocument. Mark this bug as verified.