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

Bug 313743

Summary: exception reported totally off
Product: z_Archived Reporter: Dean Hiller <dean>
Component: BIRTAssignee: Birt-ReportEngine-inbox <Birt-ReportEngine-inbox>
Status: RESOLVED FIXED QA Contact: Xiaoying Gu <bluesoldier>
Severity: normal    
Priority: P3 CC: bluesoldier, wyan, yChen
Version: unspecified   
Target Milestone: 2.6.2   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Dean Hiller CLA 2010-05-20 11:01:55 EDT
I am trying to debug a problem and the error message on the screen from BIRT is 

+ A BIRT exception occurred: Invalid javascript expression: dataSetRow["TPVID"]. See next exception for more information.
Invalid javascript expression: dataSetRow["TPVID"] 

This is totally bogus though and incorrect.  That is not the problem.  I found out if I take my old WEB-INF/lib directory from production and put it into my current software, my stuff starts working again, so I believe there is a ClassNotFoundException or NoSuchMethodError exception...some kind of incompatibility.

BIRT should

1. throw the exception to our code AND not handle it itself so we know the report generation failed and can notify operations.

In most cases BIRT is swallowing lots of exceptions and should just really chain them up and throw them to the very top just like any good component does.  Logging it is optional....I don't really care.  I just need to notify ops that an report failed in production AND nee to have the core exception that happened NOT the one above which is totally wrong.
Comment 1 Dean Hiller CLA 2010-05-20 11:03:53 EDT
oh, and I have seen this happen before as well.  for instance when you take away the library.config file, internally to BIRT, there is a FileNotFoundException but because BIRT swallowed it and never threw that back to us either, then the result was parameter account is null and it took 12 hours to debug.  THROW the exceptions to the application and get rid of all try...catch blocks or in every catch block REthrow a new exception chaining it to the old one.....PLEASE!!!
Comment 2 Wei Yan CLA 2010-05-26 02:24:19 EDT
BIRT provides two error modes:

1. Continue mode, the task will continue even there are some exceptions. The exceptions are saved into a internal error list and the user can check the errors after the task finished. It is useful to debug the report design. Actually it is the mode used in preview.

2. Cancel model, the task will stopped and throw out the exception.

You can use IEngineTask.setErrorHandlingOption( int option ) to control the error mode.


At the same time, BIRT still need to be enhanced in your case as the first error should be some ClassNotFoundException or something else which is more meaningful to the user.
Comment 3 Yu Chen CLA 2010-12-08 02:19:28 EST
We cannot terminate the whole report generation because of a minor exception.

1) You can use IEngineTask.getErrors() to check the error list. The error list records the exceptions in sequence. 

2) Or you can try the Cancel model to help debugging.

If these doesn't fit your need, please reopen the bug and upload the steps to reproduce the issue. It will help us to locate the bug.