Bug 688679 - need a way to correlate server stack traces with GWT client error messages
Summary: need a way to correlate server stack traces with GWT client error messages
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core Server
Version: 4.0.0.B02
Hardware: Unspecified
OS: Unspecified
high
high vote
Target Milestone: ---
: ---
Assignee: John Mazzitelli
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-17 17:28 UTC by John Mazzitelli
Modified: 2011-05-24 01:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-24 01:10:24 UTC


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.