Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
BIRT Viewer
stuart
Hi All,
Since the release of BIRT 2.3.2 have there been any changes/improvements to the BIRT viewer - especially in the area of error handling and the ability to provide a custom error page?
Thanks,
Stuart.
Find more posts tagged with
Comments
stuart
Any developments re: BIRT Viewer? thanks.
mwilliams
Hi stuart,
What kinds of errors are you trying to catch?
stuart
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="67719" data-time="1282709676" data-date="24 August 2010 - 09:14 PM"><p>
Hi stuart,<br />
<br />
What kinds of errors are you trying to catch?<br /></p></blockquote>
<br />
<br />
Hi Michael,<br />
<br />
See "stack trace" image. I was wondering if it was possible to provide a more user friendly error page rather than the stack trace.<br />
<br />
Stuart.
spooky
<blockquote class='ipsBlockquote' data-author="'stuart'" data-cid="67720" data-time="1282710448" data-date="24 August 2010 - 09:27 PM"><p>
Hi Michael,<br />
<br />
See "stack trace" image. I was wondering if it was possible to provide a more user friendly error page rather than the stack trace.<br />
<br />
Stuart.<br /></p></blockquote>
Hi! I'm also wondering how can I catch the BIRT Viewer exceptions. I want to write a log in DB when viewer exception occurs.<br />
<br />
Vassil<br />
<br />
EDIT:<br />
I found the solution that works for me.<br />
Make a servlet which extends org.eclipse.birt.report.servlet.ViewerServlet.<br />
Change the mapping in the web.xml file to point the new servlet instead of the ViewerServlet.<br />
Override just the __handleNonSoapException method. There you can handle the exceptions and provide user friendly errors.<br />
Here I make request to another servlet which logs the error in DB.
mwilliams
Hi spooky,<br />
<br />
Thanks for the info. If you had time, you could post a detailed explanation of what you did to handle the exceptions in the devShare for others to see. You'd also be entered in the <a class='bbc_url' href='
http://www.birt-exchange.org/org/wiki/index.php?title=DevShare_Contributor_of_the_Month_Contest'>devShare
Contributor of the Month</a> contest.
stuart
<blockquote class='ipsBlockquote' data-author="'spooky'" data-cid="67727" data-time="1282721034" data-date="25 August 2010 - 12:23 AM"><p>
Hi! I'm also wondering how can I catch the BIRT Viewer exceptions. I want to write a log in DB when viewer exception occurs.<br />
<br />
Vassil<br />
<br />
EDIT:<br />
I found the solution that works for me.<br />
Make a servlet which extends org.eclipse.birt.report.servlet.ViewerServlet.<br />
Change the mapping in the web.xml file to point the new servlet instead of the ViewerServlet.<br />
Override just the __handleNonSoapException method. There you can handle the exceptions and provide user friendly errors.<br />
Here I make request to another servlet which logs the error in DB.<br /></p></blockquote>
<br />
<br />
Hi Spooky,<br />
<br />
I tried overriding the __handleNonSoapException method but it doesn't seem to work for me. I put he extended org.eclipse.birt.report.servlet.ViewerServlet class in the classes directory of the webviewer but it seems to ignore it. Any ideas?<br />
<br />
Thanks,<br />
<br />
Stuart.
spooky
<blockquote class='ipsBlockquote' data-author="'stuart'" data-cid="70828" data-time="1291095163" data-date="29 November 2010 - 10:32 PM"><p>
...I tried overriding the __handleNonSoapException method but it doesn't seem to work for me...<br /></p></blockquote>
Hi,<br />
<br />
This is how my overriden method looks like:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
@Override
protected void __handleNonSoapException(HttpServletRequest request,
HttpServletResponse response, Exception exception) throws ServletException, IOException {
exception.printStackTrace();
BirtUtility.appendErrorMessage(response.getOutputStream(), exception);
// YOUR CODE GOES HERE
}
</pre>
The most important thing is to define your servlet in the web.xml this way:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><servlet>
<servlet-name>ViewerServletProxy</servlet-name>
<servlet-class>com.test.ViewerServletProxy</servlet-class>
</servlet></pre>
and to modify the used mapping (for me this is "frameset") to point your servlet:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><servlet-mapping>
<servlet-name>ViewerServletProxy</servlet-name>
<url-pattern>/frameset</url-pattern>
</servlet-mapping></pre>
<br />
This is everything
<br />
<br />
Vassil