Home » Archived » BIRT » BIRT Engine and server doesn't respond
BIRT Engine and server doesn't respond [message #898723] |
Fri, 27 July 2012 07:01  |
Eclipse User |
|
|
|
I'm using BIRT Engine v3.2.1, running on Glassfish 3.1.2 (build 23).
I'm not using the BIRT Viewer, I'm getting birt's partial html response a injecting it is the page.
See below:
@RequestMapping(value = "/filter.htm")
public void filter(@RequestBody Filter filter, HttpServletRequest request, HttpServletResponse response) throws Exception {
try {
Map parametersMap = reportUtils.getParametersMap(filter);
if(filter.getName() == null){
throw new ReportException("There is no Report Name provided to generate the report");
}
ServletContext sc = request.getSession().getServletContext();
this.birtReportEngine = BirtEngine.getBirtEngine(sc);
response.setContentType("text/html");
IReportRunnable design;
//Open report design
design = birtReportEngine.openReportDesign(sc.getRealPath("/reports") + "/" + filter.getName());
//create task to run and render report
IRunAndRenderTask task = birtReportEngine.createRunAndRenderTask(design);
//the multi-select values to use. This just needs to be Object[].
task.setParameterValues(parametersMap);
task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY, ReportController.class.getClassLoader());
task.getAppContext().put("BIRT_VIEWER_HTTPSERVLET_REQUEST", request);
//set output options
HTMLRenderOption options = new HTMLRenderOption();
options.setEmbeddable(true);
options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML);
//options.setUrlEncoding("UTF-8");
options.setOutputStream(response.getOutputStream());
options.setImageHandler(new HTMLServerImageHandler());
options.setBaseImageURL(request.getContextPath() + "/images");
options.setImageDirectory(sc.getRealPath("/images"));
task.setRenderOption(options);
//run report
task.run();
task.close();
} catch (Exception e) {
e.printStackTrace();
throw new Exception(e);
}
}
When I request the engine to render the report the server blocks and the client is stuck waiting for a response.
This only happens for a specific combination of parameters in a specific envirement or screen resolution, I'm not sure but I was always able to reproduce the problem in my machine and my collegue in other machine wasn't for the same combination of parameters, but he reproduce for other sequence that I couldn't.
There is no exception in the server.log and in the BIRT log with the level=ALL option I can only see that the engine doesn't close and exit like it does in normal executions.
Memory looks fine and SQL connection looks fine since I can see that BIRT executes the queries, parse the results and beforeClose event of the DataSet is always executed.
The bigger problem with this is that after this problem I have to restart the server to continue.
I was able to reproduce the problem using the Birt Designer. Using a specific combination of parameters I was always able to reproduce the problem. I started to remove some components of my report and I realized that the problem was in a pie chart.
I started to change some definitions in the pie and I realized that a specific rotation with a coverage of 100% on the pie, for that specific combination of parameters, was causing the problem.
Would be possible that BIRT crashes doing some dimension calculation?
I think it could be important to know that i'm sending the chart dimensions (width and height) through parameters, calculated based on the client screen dimensions, that is why I'm considering user screen resolution as the reason for working in one and not working in others.
So now, changing coverage and rotation is working fine, in all the tests that we did, but I don't know the specific cause of the problem so it could happen again.
Thank you
|
|
|
Re: BIRT Engine and server doesn't respond [message #899125 is a reply to message #898723] |
Mon, 30 July 2012 11:39   |
Eclipse User |
|
|
|
Ricardo,
I have not seen this problem, but could you post the design? What
output format for the chart are you using?
Jason
On 7/27/2012 7:01 AM, Ricardo Rodrigues wrote:
> I'm using BIRT Engine v3.2.1, running on Glassfish 3.1.2 (build 23).
> I'm not using the BIRT Viewer, I'm getting birt's partial html response
> a injecting it is the page. See below:
>
> @RequestMapping(value = "/filter.htm")
> public void filter(@RequestBody Filter filter, HttpServletRequest
> request, HttpServletResponse response) throws Exception {
> try {
> Map parametersMap = reportUtils.getParametersMap(filter);
> if(filter.getName() == null){
> throw new ReportException("There is no Report Name provided
> to generate the report");
> }
> ServletContext sc = request.getSession().getServletContext();
>
> this.birtReportEngine = BirtEngine.getBirtEngine(sc);
> response.setContentType("text/html");
>
> IReportRunnable design;
> //Open report design
> design =
> birtReportEngine.openReportDesign(sc.getRealPath("/reports") + "/" +
> filter.getName());
> //create task to run and render report
> IRunAndRenderTask task =
> birtReportEngine.createRunAndRenderTask(design);
> //the multi-select values to use. This just needs to be
> Object[].
> task.setParameterValues(parametersMap);
>
> task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY,
> ReportController.class.getClassLoader());
> task.getAppContext().put("BIRT_VIEWER_HTTPSERVLET_REQUEST",
> request);
>
> //set output options
> HTMLRenderOption options = new HTMLRenderOption();
> options.setEmbeddable(true);
> options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML);
> //options.setUrlEncoding("UTF-8");
> options.setOutputStream(response.getOutputStream());
> options.setImageHandler(new HTMLServerImageHandler());
>
> options.setBaseImageURL(request.getContextPath() + "/images");
> options.setImageDirectory(sc.getRealPath("/images"));
> task.setRenderOption(options);
>
> //run report
> task.run();
> task.close();
> } catch (Exception e) {
> e.printStackTrace();
> throw new Exception(e);
> }
> }
>
>
> When I request the engine to render the report the server blocks and the
> client is stuck waiting for a response.
> This only happens for a specific combination of parameters in a specific
> envirement or screen resolution, I'm not sure but I was always able to
> reproduce the problem in my machine and my collegue in other machine
> wasn't for the same combination of parameters, but he reproduce for
> other sequence that I couldn't.
>
> There is no exception in the server.log and in the BIRT log with the
> level=ALL option I can only see that the engine doesn't close and exit
> like it does in normal executions.
>
> Memory looks fine and SQL connection looks fine since I can see that
> BIRT executes the queries, parse the results and beforeClose event of
> the DataSet is always executed.
>
> The bigger problem with this is that after this problem I have to
> restart the server to continue.
>
> I was able to reproduce the problem using the Birt Designer. Using a
> specific combination of parameters I was always able to reproduce the
> problem. I started to remove some components of my report and I realized
> that the problem was in a pie chart.
> I started to change some definitions in the pie and I realized that a
> specific rotation with a coverage of 100% on the pie, for that specific
> combination of parameters, was causing the problem.
>
> Would be possible that BIRT crashes doing some dimension calculation?
>
> I think it could be important to know that i'm sending the chart
> dimensions (width and height) through parameters, calculated based on
> the client screen dimensions, that is why I'm considering user screen
> resolution as the reason for working in one and not working in others.
>
> So now, changing coverage and rotation is working fine, in all the tests
> that we did, but I don't know the specific cause of the problem so it
> could happen again.
>
> Thank you
|
|
|
Re: BIRT Engine and server doesn't respond [message #899140 is a reply to message #899125] |
Mon, 30 July 2012 12:18   |
Eclipse User |
|
|
|
Hi Jason,
We are now debugging the birt source and looks like birt gets into a infinite loop.
One of the slices in the pie chart has an loStart with an x value of -1.2175^E12 which is a very large -ve number.
This value gets passed into java2d's MaskFill class method FillAAPgram and appears to hang in here and never return.
See the screeshot attach.
The report is attach.
Note:
After my change from 100% to 90% chart coverage, the problem still couldn't be reproduced.
The problem only happens for a specific combination of parameters:
[userValue, dateTo, width, drillCatId, type, drillValData, dimension, title, xAxisTitle, height, level, drillCatData, role, dateFrom]
[-1, 7-30-2012, 1170pt, 114, pieGraph, Joseph_Van_2_M, student, Student Connected Report, Joseph_Van_2_M's Students, 275.25pt, student, Joseph_Van_2_M, ROLE_ADMIN, 08-01-2011]
Where here we think what really matters is the number os results returned from the query
Any help would be appreciated
Thank you
|
|
|
Re: BIRT Engine and server doesn't respond [message #899147 is a reply to message #899140] |
Mon, 30 July 2012 12:30   |
Eclipse User |
|
|
|
Ricardo,
If you remove the chart scripts do you get this error. It looks like
something is wrong with the loStart location as you have seen. I would
like to figure out if the plot calc engine has a bug.
Jason
On 7/30/2012 12:18 PM, Ricardo Rodrigues wrote:
> Hi Jason,
>
> We are now debugging the birt source and looks like birt gets into a infinite loop.
>
> One of the slices in the pie chart has an loStart with an x value of -1.2175^E12 which is a very large -ve number.
> This value gets passed into java2d's MaskFill class method FillAAPgram and appears to hang in here and never return.
> See the screeshot attach.
>
> The report is attach.
>
> Note:
> After my change from 100% to 90% chart coverage, the problem still couldn't be reproduced.
>
> The problem only happens for a specific combination of parameters:
> [userValue, dateTo, width, drillCatId, type, drillValData, dimension, title, xAxisTitle, height, level, drillCatData, role, dateFrom]
> [-1, 7-30-2012, 1170pt, 114, pieGraph, Joseph_Van_2_M, student, Student Connected Report, Joseph_Van_2_M's Students, 275.25pt, student, Joseph_Van_2_M, ROLE_ADMIN, 08-01-2011]
> Where here we think what really matters is the number os results returned from the query
>
> Any help would be appreciated
>
> Thank you
>
|
|
| | | | | | |
Goto Forum:
Current Time: Thu May 08 16:15:05 EDT 2025
Powered by FUDForum. Page generated in 0.07966 seconds
|