Asynchrony Testing [message #749991] |
Tue, 25 October 2011 11:07  |
Eclipse User |
|
|
|
Hi,
I have developed a empty birt report that calls the initialize 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 asynchronisly 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. Has anyone had simular issues with Birt? Thanks in advance with any suggestions that you may offer.
Thanks,
Marc
|
|
|
|
|
|
|
Re: Asynchrony Testing [message #750463 is a reply to message #750415] |
Tue, 25 October 2011 16:05   |
Eclipse User |
|
|
|
Marc,
What version of BIRT are you using and are you using the viewer?
Do you get the same set of errors if you do not use an event handler?
Jason
On 10/25/2011 3:36 PM, marc.marshall wrote:
> Jason,
>
> 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. Thanks for your help.
>
> Thanks,
>
> Marc
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09923 seconds