问题
We have several reports and several applications feeding the reports with data. We use BIRT Report Viewer 2.3.2 to display the reports.
Thing is, when an application is unreachable the BIRT Report Viewer displays an error message box titled "Exception" with the exception header, the link to expand the stack trace, and two buttons, ok and cancel.
For these kind of exceptions i would like a friendlier message saying something like "Application X is reloading, please wait a few minutes and try again.", with no stack trace, and only one ok button.
The exception is: org.eclipse.birt.data.engine.odaconsumer.ConnectionManager openConnection SEVERE: Cannot open connection. org.eclipse.birt.report.data.oda.jdbc.JDBCException: There is an error in get connection, The url cannot be null.
In any case i do not care what the exception happens to be, i want it logged in the log4j and a friendly message box displayed on the BIRT Report Viewer.
Any ideas?
回答1:
If you want to customize the exception then
Goto -->\webcontent\birt\pages\dialog\ExceptionDialogFragment.jsp of your war file and you can customize of your own message like
Sorry for the Inconvenience. Unexpected Error Occurred. Please contact administrator
by removing the stack trace provided in that jsp file.
来源:https://stackoverflow.com/questions/23091701/birt-report-viewer-custom-error-reporting