从javascript堆栈跟踪中查找Java实际堆栈跟踪 [英] Finding the Java actual stack trace from a javascript stack trace
问题描述
我们已经实现了一个通用机制,可以从GWT客户端登录服务器异常。
当然,其中一些是意想不到的异常(例如NPE),因此我们在日志(摘录)中找到了一些堆栈跟踪:
java.lang.Throwable:捕获一个或多个异常,请参阅UmbrellaException中的全部集合Unknown.Hq(Unknown Source)处的$ getCauses
Unknown Unknown.ihb处的
(Unknown Source )在Unknown.anonymous(未知源)处
在Unknown.anonymous处(未知源)
在Unknown.anonymous(未知源)处
由java.lang.Throwable引起: (TypeError):d为空
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(未知来源)
如何在原始java源代码中找到类和行号?
我想要部署一个详细的编译版本,因为我没有关于确切场景的信息,我不能重现这个异常。
GWT编译器在 -deploy
和 -extra
位置的symbolMap文件中输出映射(其中 -deploy
默认为 -war
的 WEB-INF / deploy
和 -extra
默认情况下不会发出)。
手动使用它来从时间调试奇怪的事情您可以使用 最新的/ com / google / gwt / logging / server / StackTraceDeobfuscator.html> StackTraceDeobfuscator
。
FYI,此类使用 RemoteLoggingServiceImpl
GW T-RPC servlet和 Logging
RequestFactory服务;分别由 SimpleRemoteLogHandler
和 RequestFactoryLogHandler
(它们是 java.util.logging.LogHandler
s您可以将它与GWT支持的日志API 一起使用。在这种情况下,它会查看webapp的 WEB-INF / deploy
(这就是为什么 -deploy
默认值)。
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
's WEB-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 the Logging
RequestFactory service; respectively called by the SimpleRemoteLogHandler
and RequestFactoryLogHandler
(they're java.util.logging.LogHandler
s which you can use with the logging API that GWT supports). In this case, it looks into the WEB-INF/deploy
of the webapp (which is why -deploy
defaults there).
这篇关于从javascript堆栈跟踪中查找Java实际堆栈跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!