Community
Participate
Working Groups
I am calling BIRT with task.setErrorHandlingOption(IEngineTask.CANCEL_ON_ERROR). This seems to work for some cases, but not in the most important case. If there is a JDBC exception while fetching data from the DB (for example, if a DBA killed your DB session), BIRT tries to continue. This has several drawbacks. - First of all, it is absolutely useless. - If the report cannot access the database, it's output is crippled. - The user may not even notice this and think the report output is ok, while important data is missing actually. - This in turn can cause serious real-world trouble. - It produces a huge bunch of useless log output for all the following attempts to access any data set. For example, one of my production reports produces > 200 KB of log, most lines "Caused by: ..." or "at...". I propose to add an optional flag to the task, that will cause the task to cancel if an unexpected error happens while accessing the data source. For an example of what I mean: java.sql.SQLRecoverableException: ORA-00028: your session has been killed) This situation can be provoked by a very slow SQL statement in BIRT and killing the session as a DBA while it is active. More concrete, on Oracle you could call a SQL function that calls SYS.DBMS_LOCK.SLEEP(1) for each row in the SELECT. As a side note, Javascript exceptions do not seem to cause the task to cancel. This is arguable (BIRT treats Javascript like a browser, like an optional bonus). This can be catched after calling the report by considering task.getErrors() afterwards.