Jump to content
We've recently updated our Privacy Statement, available here ×

Friendly Errors


carminez

Recommended Posts

Is there any way to enable "friendly" error messages in JasperServer? For example, I would rather not have my users seeing java error messages when something goes wrong. Or when a report schedule times out, I'd rather the user get in the email that the error was a timeout, instead of the error below.

 

Is there a setting somewhere to pick which type of error messages get displayed?

 


Code:
java.lang.IllegalArgumentException: error getting datarator	at com.jaspersoft.ji.adhoc.service.AdhocEngineServiceImpl.fillReport(AdhocEngineServiceImpl.java:1649)	at com.jaspersoft.ji.adhoc.service.AdhocEngineServiceImpl.execute(AdhocEngineServiceImpl.java:1596)	at com.jaspersoft.ji.report.options.engine.ReportOptionsExecutionJob.executeReport(ReportOptionsExecutionJob.java:113)	at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:369)	at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:188)	at org.quartz.core.JobRunShell.run(JobRunShell.java:195)	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)Caused by: com.jaspersoft.commons.util.QueryExecutionTimeoutException: jsexception.QueryExecutionTimeoutException	at com.jaspersoft.commons.util.JSControlledJdbcQueryExecuter.createDatasource(JSControlledJdbcQueryExecuter.java:101)	at com.jaspersoft.commons.datarator.jr.JRDataSourceAdapter.getJRDataSource(JRDataSourceAdapter.java:104)	at com.jaspersoft.commons.datarator.jr.JRDataSourceAdapter.access$100(JRDataSourceAdapter.java:32)	at com.jaspersoft.commons.datarator.jr.JRDataSourceAdapter$JRDataSetIterator.next(JRDataSourceAdapter.java:134)	at com.jaspersoft.commons.datarator.CachedData.fetchData(CachedData.java:51)	at com.jaspersoft.commons.datarator.DataSetCacheImpl.getCachedDataSet(DataSetCacheImpl.java:132)	at com.jaspersoft.commons.datarator.DataSetCacheImpl.getCachedDataSet(DataSetCacheImpl.java:78)	at com.jaspersoft.ji.adhoc.service.AdhocEngineServiceImpl.getDatarator(AdhocEngineServiceImpl.java:252)	at com.jaspersoft.ji.adhoc.service.AdhocEngineServiceImpl.getDatarator(AdhocEngineServiceImpl.java:188)	at com.jaspersoft.ji.adhoc.service.AdhocEngineServiceImpl.fillReport(AdhocEngineServiceImpl.java:1647)	... 6 more
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

For my example above, the report schedule timed out. So the user received their report schedule email, but the body of the message said "An error occurred while executing the report." And then a text file attachment with the full error.

 

I was wondering if there is a way to trap certain errors and display a message that might be more meaningful to a layman. For example "An error occurred while executing the report." followed by "The report exceeded the timeout setting." Because a user is not going to understand looking at the text file attachment with the error, once they start seeing java..... in the attachment they will ignore it. For a developer, they know to look in there and can see the line that says: "Caused by: com.jaspersoft.commons.util.QueryExecutionTimeoutException: jsexception.QueryExecutionTimeoutException" and realize it was a timeout.

I guess just like how we have properties files for other messages in JasperServer so we can show a translation, I'm wondering if there is the same for error messages???

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...