Finding the actual Java stack trace from a javascript stack trace

We have implemented a common mechanism that is registered on server exceptions from the client side of GWT. Naturally, some of them are unexpected exceptions (for example, NPE), and therefore we get the appearance of these stack traces in our log (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 class number and row in java source source?

I do not want to deploy a detailed compiled version, since I have no information about the exact scenario, and I cannot throw an exception.

+6
source share
1 answer

The GWT compiler displays the symbolMap files in the places -deploy and -extra (where -deploy defaults to -war WEB-INF/deploy , and -extra is not selected by default).
I use it manually to debug strange things from time to time.

You can also program tracks using the StackTraceDeobfuscator .
FYI, this class is used by the RemoteLoggingServiceImpl GWT-RPC servo and Logging RequestFactory; SimpleRemoteLogHandler and RequestFactoryLogHandler (they are java.util.logging.LogHandler , which you can use with the logging protocol that supports GWT). In this case, it looks in WEB-INF/deploy web applications (therefore -deploy by default there).

+6
source

Source: https://habr.com/ru/post/899516/


All Articles