Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362007 - Receiving exception errors when running a Asynchronous Stress Test.
Summary: Receiving exception errors when running a Asynchronous Stress Test.
Status: VERIFIED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.6.2   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Birt-ReportEngine-inbox@eclipse.org CLA
QA Contact: Liwen Chen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-25 17:02 EDT by marc.marshall CLA
Modified: 2012-02-09 03:16 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description marc.marshall CLA 2011-10-25 17:02:20 EDT
Build Identifier: 20110218-0911

I have developed a empty birt report that calls the beforeFactory event handler for the report. This event handler dynamically creates the DataSource, Dataset and Report contents. I am currently testing on a Tomcat server using the Birt Runtime 2.6. I ran a batch file to call my report 40 times one right after another and all of the reports were created successfully. If I try to load 8 files asynchronously I get random errors like "Can not load the report query: 372. Errors occurred when generating the report document for the report element with ID 372. ", "Page hint could not be loaded", and blank pages are just a few. Sometimes all of the reports are created successfully. I am confused why these errors are happening.

I have the report inside a report folder inside of a Birt runtime running in Tomcat. My report has one event handler for the report level (BeforeFactory). The BeforeFactory method calls the BuildReport method below:

private void buildReport(IReportContext reportContext) throws IOException,
SemanticException {
ReportDesignHandle rd = null;
String vname = "";
String vtype = "";
String vnumber = "";
//logger.error("buildReport: ");
try {
elementFactory = reportContext.getReportRunnable()
.getDesignHandle().getElementFactory();
rd = (ReportDesignHandle) reportContext.getReportRunnable()
.getDesignHandle();

rd = buildDataSource(rd);

vname = reportContext.getParameterDisplayText("VendorName");
vnumber = reportContext.getParameterDisplayText("VendorNumber");
vtype = reportContext.getParameterDisplayText("ServiceType");
rd = buildDataSet(rd, vname, vnumber, vtype);

// get a reference to the ElementFactory
LabelHandle label;
label = getLabelHeader();

TableHandle table = elementFactory.newTableItem("table",
cols.length);

table = setTableSettings(table);

table.setWidth("100%");

table.setDataSet(rd.findDataSet("ds"));

table = buildExpressions(table);

// table header
table = buildTableHeaders(table);

// table detail
table = buildRowData(table);

rd.getBody().add(label);
rd.getBody().add(table);

} catch (Exception e) {
logger.error(new StringBuffer("buildReport method error: ")
.append(e.toString()));

}

}

This code is placed in my WEB-INF classes folder. Please let me know if you need more information.

am using Tomcat 6.0.32 and Birt Runtime 2.6.2. I use http://localhost:8080/birt-viewer/frameset?__report=report/Dynamic_Vendor.rptdesign to call my report. It appears that some times my code is never executed. I placed a logger statement at the beginning of my event handler and sometimes I never see the log statement. I removed my Event handler from my report and ran the same test. Most of the time it renders the empty report. One time I ran it said that it could not render the report "Failed to open report". This is one of the error that keep popping up.





Reproducible: Sometimes
Comment 1 marc.marshall CLA 2011-10-26 10:00:49 EDT
I also want to add that to asynchronously open the website I have loaded them as home pages in Internet Explorer 8.  By using this I am able to load 8 pages asynchronously when opening Internet Explorer.
Comment 2 Gang Liu CLA 2011-11-09 02:15:29 EST
is it reproducible it in 3.7.1, we fixed several multilple-thread issues in 3.7.1
Comment 3 marc.marshall CLA 2011-11-09 09:24:15 EST
(In reply to comment #2)
> is it reproducible it in 3.7.1, we fixed several multilple-thread issues in
> 3.7.1

I am able to reproduce it in 3.7.0.  Instead of using IE to produce the error. I created 40 *.bat files and open them at the same time even if the *.rptdesign file is empty.  I continue to get a random Exception box that says "The viewing session is not available or has expired".
Comment 4 Jun Ouyang CLA 2011-12-29 03:44:21 EST
Hi, could you please try it in 3.7.1? And it will be very helpful to upload your report or any report which can reproduce the issue. Thanks.
Comment 5 Gang Liu CLA 2012-01-04 02:11:51 EST
Does all the 40 thread share the viewing session?

If the same session, the error is expected. Since in the same session, the design handle is shared. If some thread to run the report, and other threads try to change the report, the error will occurs.

In this case, user should use different session for each thread.
Comment 6 Gang Liu CLA 2012-02-07 22:01:33 EST
set to worksforme.
Comment 7 Liwen Chen CLA 2012-02-09 03:16:30 EST
No response from reporter, close it.
If still can reproduce it, please reopen this bug.