We have implemented a general mechanism that logs on the server exceptions from the GWT client side. Naturally, some of them are unexpected exceptions (such as NPE), and therefore we are getting kind of these stack traces in our log (an excerpt):
java.lang.Throwable: One or more exceptions caught, see full set in UmbrellaException#getCauses at Unknown.Hq(Unknown Source) at Unknown.ihb(Unknown Source) at Unknown.anonymous(Unknown Source) at Unknown.anonymous(Unknown Source) at Unknown.anonymous(Unknown Source) Caused by: java.lang.Throwable: (TypeError): d is null stack: EG([object Object],[object Object])@http://domain/path/0B15791BA99231E6B88EAF3BDE38EB64.cache.html:3282 fileName: http://domain/path/0B15791BA99231E6B88EAF3BDE38EB64.cache.html lineNumber: 3282 at Unknown.EG(Unknown Source) at Unknown.DG(Unknown Source)
How can I find the class and line number in the original java source?
I don't want to deploy a detailed compiled version, since I don't have information about the exact scenario and I can't reproduce the exception.
The GWT compiler outputs the mapping in symbolMap files in the
-deploy
and-extra
locations (where-deploy
defaults to the-war
'sWEB-INF/deploy
, and-extra
is not emitted by default).I use it manually to debug weird things from time to time.
You can also deobfuscate traces programmatically, using the
StackTraceDeobfuscator
.FYI, this class is used by the
RemoteLoggingServiceImpl
GWT-RPC servlet and theLogging
RequestFactory service; respectively called by theSimpleRemoteLogHandler
andRequestFactoryLogHandler
(they'rejava.util.logging.LogHandler
s which you can use with the logging API that GWT supports). In this case, it looks into theWEB-INF/deploy
of the webapp (which is why-deploy
defaults there).