Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » how to disable stack trace with BIRT 2.6.1 - confirm steps within please
icon8.gif  how to disable stack trace with BIRT 2.6.1 - confirm steps within please [message #1075550] Mon, 29 July 2013 16:15 Go to next message
Anthony Farrell is currently offline Anthony FarrellFriend
Messages: 29
Registered: August 2012
Junior Member
Is this the correct page to get the source for BIRT 2.6.1 ?
http://wiki.eclipse.org/BIRT/FAQ/Birt_Project#Q:_How_do_I_build_the_2.2.2F2.3.2F2.5_BIRT_Viewer.3F


I need to stop stack track information comming back to the browser if a report design file is not found or fails, its a security violation for us.
can you confirm that the following class file should be changed ? ReportEngineService.java class within the ViewServlets.jar in the lib folder,
there is a method:

private void throwDummyException( Exception e ) throws DummyRemoteException
{
if ( e instanceof ReportServiceException )
{
throw new DummyRemoteException( e );
}
else
{
throw new DummyRemoteException( new ReportServiceException(
e.getLocalizedMessage( ),
e ) );
}
}

Which I believe is passing back the exception to the client. Is this the method to change to remove the stack trace data?
Re: how to disable stack trace with BIRT 2.6.1 - confirm steps within please [message #1075619 is a reply to message #1075550] Mon, 29 July 2013 19:05 Go to previous messageGo to next message
Anthony Farrell is currently offline Anthony FarrellFriend
Messages: 29
Registered: August 2012
Junior Member
http://archive.eclipse.org/birt/downloads/build.php?build=R-R1-2_6_1-201009171723
Re: how to disable stack trace with BIRT 2.6.1 - confirm steps within please [message #1075676 is a reply to message #1075619] Mon, 29 July 2013 21:06 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

You can also get the source here:

http://git.eclipse.org/c/birt/org.eclipse.birt.git/refs/


Michael

Developer Evangelist, Silanis
Re: how to disable stack trace with BIRT 2.6.1 - confirm steps within please [message #1076039 is a reply to message #1075676] Tue, 30 July 2013 15:10 Go to previous messageGo to next message
Anthony Farrell is currently offline Anthony FarrellFriend
Messages: 29
Registered: August 2012
Junior Member
Thanks Michael, taking a copy of org.eclipse.birt-BIRT_2_6_1_Release_201009151750.zip now.

Should I use the following page for instructions on how to rebuild the ViewServlets.jar, as I need to change the ReportinEngineService.java file to NOT send back stack trace data.

Or is there a specific page describing how to build 2.6.1 ?

http://wiki.eclipse.org/BIRT/FAQ/Birt_Project#Q:_How_do_I_build_the_2.2.2F2.3.2F2.5_BIRT_Viewer.3F
Re: how to disable stack trace with BIRT 2.6.1 - confirm steps within please [message #1078150 is a reply to message #1076039] Fri, 02 August 2013 15:50 Go to previous messageGo to next message
Anthony Farrell is currently offline Anthony FarrellFriend
Messages: 29
Registered: August 2012
Junior Member
Got the source, and have build the viewer, org.eclipse.birt.report.viewer plug.

There seems to be two types of stack trace data.

Missing Report design file:

Where you specify a report design file that does not exist, if I add the following I ensure there no stack trace on screen. Can some comment if this is the best place to put this update?

package org.eclipse.birt.report.utility.BirtUtility.appendErrorMessage
...

// start of change
message = "";
// end

out.write( message.getBytes( "UTF-8" ) );
out.flush( );
out.close( );
}


Secondly, other errors, internal to reports, the errors and stack traces are embedded in the HTML report send back to the client browser.

so far I have tracked this down to the following Java file org.eclipse.birt.report.engine.executor.ExecutionContext and the following fields hold the execptions and errors that occurred.

/**
* A list of errors in time order, it is also shared by the report content
*/
private List<EngineException> errors = new ArrayList<EngineException>( );
/**
* The exception list grouped by the element
*/
protected HashMap<DesignElementHandle, ElementExceptionInfo>
elementExceptions = new HashMap<DesignElementHandle, ElementExceptionInfo>( );


What is the best way to ensure these exceptions and stack traces are not send back to the browser, should I simply modify setter methods to set the stack track data to an empty string, OR could some point me to the code that generates the HTML and I can modify this.
Re: how to disable stack trace with BIRT 2.6.1 - confirm steps within please [message #1079031 is a reply to message #1078150] Sun, 04 August 2013 00:30 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

That's probably the latest resource for building the viewer.

In the source, if you go under the "engine" directory, you'll see the emitters. The HTML emitter is there.


Michael

Developer Evangelist, Silanis
Previous Topic:Need help for Html page in RCP ViewPart
Next Topic:BIRT pushing the content down at render time?
Goto Forum:
  


Current Time: Thu Apr 25 20:46:03 GMT 2024

Powered by FUDForum. Page generated in 0.03853 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top