Bug 688679

Summary: need a way to correlate server stack traces with GWT client error messages
Product: [Other] RHQ Project Reporter: John Mazzitelli <mazz>
Component: Core ServerAssignee: John Mazzitelli <mazz>
Status: CLOSED CURRENTRELEASE QA Contact: Corey Welton <cwelton>
Severity: high Docs Contact:
Priority: high    
Version: 4.0.0.B02CC: hrupp, mfoley
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-24 01:10:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description John Mazzitelli 2011-03-17 17:28:32 UTC
Because GWT clients do not have all the exception classes that the server has (like EJBException or similar server-side only exceptions), or *GWTServiceImpl classes have to scrub all exceptions before getting thrown to the client. We do this by throwing java.lang.RuntimeException whose message is all the messages of the server-side exception/causes.

Alot of times, the GWT exception message this produces (that we show in the message center) doesn't help narrow down the real problem. We need to correlate this gwt exception message with the server-side exception stack trace.

However, lots of times, we do not log the exception on the server and thus we have no logged trace of what the error was or where it happened or its root cause.

We need a way for our GWTServiceImpl classes to log a server-side stack trace and send up the exception to the gwt client with some kind of index that we can later correlate to the server exception message.

Comment 1 John Mazzitelli 2011-03-17 17:31:40 UTC
commit 154b069

All *GWTServiceImpl's now call :

org.rhq.enterprise.gui.coregui.server.gwt.AbstractGWTServiceImpl.getExceptionToThrowToClient

and throw its returned runtime exception.

That method will log the exception server-side and return back a scrubbed exception that can be passed to the gwt client, which also includes an id number that you can use to correlate back to the server side log message/stack trace.

Comment 2 John Mazzitelli 2011-03-17 17:38:36 UTC
I have no idea how to test this. Just do something that causes a serve-side error and see that the exception is logged and you get a [####] id in the GWT UI message center's message that correlates the gwt exception to the server side exception.

Comment 3 Mike Foley 2011-04-15 16:00:05 UTC
i am seeing in the message center ... the error messages contain both the UI error ...AND the stack trace from the server.  so this is the correlation between UI exception and server exception.

Comment 4 Corey Welton 2011-05-24 01:10:24 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 5 Corey Welton 2011-05-24 01:10:42 UTC
Bookkeeping - closing bug - fixed in recent release.